Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix indentation #77

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Conversation

mateuszdrab
Copy link
Contributor

@mateuszdrab mateuszdrab commented Apr 1, 2024

Issue #74

Fixed indentation which resolved helm error:

Error: UPGRADE FAILED: YAML parse error on k8s-ephemeral-storage-metrics/templates/metrics.yaml: error converting YAML to JSON: yaml: line 16: did not find expected key

Tested with values:

interval: 60
serviceMonitor:
  metricRelabelings:
    - sourceLabels: [pod_name]
      targetLabel: pod
    - sourceLabels: [pod_namespace]
      targetLabel: namespace
    # drop labels pod_.*
    - regex: "pod_(.*)"
      action: labeldrop

Deployed manifest spec:

spec:
  endpoints:
  - interval: 60s
    metricRelabelings:
    - action: replace
      sourceLabels:
      - pod_name
      targetLabel: pod
    - action: replace
      sourceLabels:
      - pod_namespace
      targetLabel: namespace
    - action: labeldrop
      regex: pod_(.*)
    path: /metrics
    port: metrics
    scheme: http
  namespaceSelector:
    matchNames:
    - kube-system
  selector:
    matchLabels:
      app.kubernetes.io/instance: k8s-ephemeral-storage-metrics
      app.kubernetes.io/name: k8s-ephemeral-storage-metrics

@jmcgrath207 jmcgrath207 merged commit b8b2573 into jmcgrath207:metric-relabeling Apr 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants