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

ServiceMonitor conversion drops "attachMetadata" #893

Closed
k1rk opened this issue Mar 6, 2024 · 1 comment
Closed

ServiceMonitor conversion drops "attachMetadata" #893

k1rk opened this issue Mar 6, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@k1rk
Copy link
Contributor

k1rk commented Mar 6, 2024

Hi
During automatic resource conversion by operator seems like data inside attachMetadata is lost

Following ServiceMonitor

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: node-exporter
  namespace: monitoring
spec:
  attachMetadata:
    node: true
  endpoints:
    - metricRelabelings:
        - action: drop
          regex: /var/lib/kubelet/pods.+
          sourceLabels:
            - mountpoint
      port: metrics
      scheme: http
      scrapeTimeout: 10s
  jobLabel: app.kubernetes.io/name
  selector:
    matchLabels:
      app.kubernetes.io/instance: node-exporter
      app.kubernetes.io/name: node-exporter

results in following VMServiceScrape

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
  name: node-exporter
  namespace: monitoring
spec:
  endpoints:
    - attach_metadata: {}
      metricRelabelConfigs:
        - action: drop
          regex: /var/lib/kubelet/pods.+
          sourceLabels:
            - mountpoint
      port: metrics
      scheme: http
      scrapeTimeout: 10s
  jobLabel: app.kubernetes.io/name
  namespaceSelector: {}
  selector:
    matchLabels:
      app.kubernetes.io/instance: node-exporter
      app.kubernetes.io/name: node-exporter

as you can see now attach_metadata is an empty object

no errors observed in VMOperator logs

@f41gh7
Copy link
Collaborator

f41gh7 commented Apr 18, 2024

Must be fixed at v0.43.0 release

@f41gh7 f41gh7 closed this as completed Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants