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

[dev-v2.10] Add metricRelabelings to rancher-istio ServiceMonitor #4947

Open
wants to merge 1 commit into
base: dev-v2.10
Choose a base branch
from

Conversation

jsjolund
Copy link

@jsjolund jsjolund commented Jan 9, 2025

Problem

Istio allows metric relabeling on Prometheus endpoints, for example to drop unused metrics. See:

This feature is missing in the Rancher Istio Helm chart.

Solution

This change adds the ability to define an array of metrics to drop through values.yaml. Note that metricRelabelings is different from the existing relabelings array already defined in the rancher-istio ServiceMonitor.

Testing

The change can be tested by defining an array of metricRelabelings in values.yaml:

# Kiali subchart from rancher-kiali-server
kiali:
  enabled: true
  serviceMonitor:
    metricRelabelings:
    - action: drop
      regex: ^envoy_cluster_circuit_breakers_default_cx_open$
      sourceLabels:
      - __name__
    - action: drop
      regex: ^envoy_cluster_circuit_breakers_default_cx_pool_open$
      sourceLabels:
      - __name__
    - action: drop
      regex: ^envoy_cluster_circuit_breakers_default_rq_open$
      sourceLabels:
      - __name__
    - action: drop
      regex: ^envoy_cluster_circuit_breakers_default_rq_pending_open$
      sourceLabels:
      - __name__
    - action: drop
      regex: ^envoy_cluster_circuit_breakers_default_rq_retry_open$
      sourceLabels:
      - __name__

Run helm template rancher-istio ./ -n istio-system and verify the ServiceMonitor is rendered correctly.

Engineering Testing

Manual Testing

I tested this by adding the metricRelabelings array manually, installing the rancher-istio chart on a local Rancher cluster, and verified that the listed metrics are no longer available in Prometheus.

Copy link

github-actions bot commented Jan 9, 2025

Validation steps

  • Ensure all container images have repository and tag on the same level to ensure that all container images are included in rancher-images.txt which are used by airgap customers.
  Ex:-
    longhorn-controller:
      repository: rancher/hardened-sriov-cni
      tag: v2.6.3-build20230913
  
  • Add a 👍 (thumbs up) reaction to this comment once done. CI won't pass without this reaction to the github-action bot's latest validation comment.
  • Approve the PR to run the CI check.

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.

1 participant