MCPcopy Index your code
hub / github.com/K-Phoen/dark

github.com/K-Phoen/dark @v0.10.17

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.10.17 ↗ · + Follow
376 symbols 1,224 edges 64 files 115 documented · 31%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DARK

codecov

Dashboards As Resources in Kubernetes.

DARK provides a way to define and deploy Grafana dashboards via Kubernetes, next to the services they monitor.

If you are looking for a way to version your dashboards and deploy them across all environments, like you would do with your services, then this project is meant for you.

In addition to dashboards, DARK can also manage:

Design goals

  • full description of dashboards via YAML
  • integration with kubectl
  • seamless integration with Grafana
  • delegate YAML decoding and dashboard generation to Grabana

Non-goals

Example dashboard

apiVersion: k8s.kevingomez.fr/v1
kind: GrafanaDashboard
metadata:
  name: example-dashboard
  namespace: monitoring
  annotations:
    dark/folder: "Awesome folder"
spec:
  title: Awesome dashboard
  shared_crosshair: true
  tags: [generated, yaml]
  auto_refresh: 10s

  variables:
    - interval:
        name: interval
        label: interval
        default: 1m
        values: [30s, 1m, 5m, 10m, 30m, 1h, 6h, 12h]

  rows:
    - name: Prometheus
      panels:
        - timeseries:
            title: HTTP Rate
            datasource: prometheus-default
            targets:
              - prometheus:
                  query: "rate(promhttp_metric_handler_requests_total[$interval])"
                  legend: "{{ handler }} - {{ code }}"

        - graph:
            title: Heap allocations
            datasource: prometheus-default
            targets:
              - prometheus:
                  query: "go_memstats_heap_alloc_bytes"
                  legend: "{{ job }}"

More examples can be found in the examples/ folder

Installation & usage

Check out the documentation to dig deeper into how to set up and use DARK.

Adopters

Companies using DARK.

They talk about DARK

License

This library is under the MIT license.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

NewJSON
called by 68
internal/pkg/converter/json.go
strPtr
called by 27
internal/pkg/converter/utils.go
convertDataPanel
called by 19
internal/pkg/converter/json.go
convertTarget
called by 17
internal/pkg/converter/target.go
RefToValue
called by 11
internal/pkg/grafana/datasources.go
convertPanelLinks
called by 10
internal/pkg/converter/panellink.go
panelSpan
called by 9
internal/pkg/converter/json.go
containsString
called by 8
internal/pkg/controllers/helpers.go

Shape

Method 218
Function 99
Struct 53
Interface 6

Languages

Go100%

Modules by API surface

api/v1alpha1/zz_generated.deepcopy.go76 symbols
api/v1alpha1/datasource_types.go18 symbols
internal/pkg/grafana/alertmanager.go14 symbols
internal/pkg/converter/json.go14 symbols
api/v1alpha1/alertmanager_types.go13 symbols
internal/pkg/converter/timeseries_test.go12 symbols
internal/pkg/grafana/apikeys.go10 symbols
internal/pkg/converter/timeseries.go10 symbols
internal/pkg/converter/target_test.go10 symbols
internal/pkg/grafana/datasources.go9 symbols
internal/pkg/converter/variable.go9 symbols
internal/pkg/controllers/datasource_controller.go9 symbols

For agents

$ claude mcp add dark \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page