---

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization


namespace: node-exporter


labels:
  - includeSelectors: true
    pairs:
      app.kubernetes.io/instance: cluster
      app.kubernetes.io/name: grafana-agent
      app.kubernetes.io/part-of: grafana-agent


resources:
  - ../../base

# components:
#   - ../../components/dashboard
#   - ../../components/metrics
#   - ../../components/prometheus-rules


replacements:
  - source:
      kind: DaemonSet
      name: grafana-agent
      fieldPath: metadata.namespace
    targets:
      - select:
          kind: ClusterRoleBinding
          name: grafana-agent
        fieldPaths:
          - subjects.[name=grafana-agent].namespace
