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

feat: add metricRelabelings support to ServiceMonitor #433

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

benjohnson-dev
Copy link
Contributor

what

why

  • Prevents potential cardinality issues, allows user control over metric ingestion spend

tests

  • diff output of enabled ServiceMonitor with/without new value
--- 219,229 ----
    - port: atlantis
      interval: 30s
      path: /metrics
+     metricRelabelings:
+       - action: drop
+         regex: atlantis_project_apply_execution_.*
+         sourceLabels:
+         - __name__
  • ran make unit-test-run-atlantis
### Chart [ atlantis ] ./charts/atlantis

 PASS  test configmap-gitconfig-init for gitconfig	charts/atlantis/tests/configmap-gitconfig-init_test.yaml
 PASS  test pvc	charts/atlantis/tests/pvc_test.yaml
 PASS  test secret-api for api secret	charts/atlantis/tests/secret-api_test.yaml
 PASS  test secret-aws for aws	charts/atlantis/tests/secret-aws_test.yaml
 PASS  test secret-basic-auth for git basic-auth secret	charts/atlantis/tests/secret-basic-auth_test.yaml
 PASS  test secret-gitconfig for gitconfig	charts/atlantis/tests/secret-gitconfig_test.yaml
 PASS  test secret-netrc for netrc	charts/atlantis/tests/secret-netrc_test.yaml
 PASS  test secret-service-account for serviceAccountSecrets	charts/atlantis/tests/secret-service-account_test.yaml
 PASS  test secret-webhook for git webhook secret	charts/atlantis/tests/secret-webhook_test.yaml
 PASS  test service	charts/atlantis/tests/service_test.yaml
 PASS  test statefulset	charts/atlantis/tests/statefulset_test.yaml

Charts:      1 passed, 1 total
Test Suites: 11 passed, 11 total
Tests:       93 passed, 93 total
Snapshot:    0 passed, 0 total
Time:        672.058375ms

references

@benjohnson-dev benjohnson-dev requested a review from a team as a code owner October 25, 2024 18:32
Signed-off-by: benjohnson-dev <ben@benjohnson.dev>
Copy link
Member

@GMartinez-Sisti GMartinez-Sisti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution @benjohnson-dev!

@GMartinez-Sisti GMartinez-Sisti merged commit a6ba6a3 into runatlantis:main Oct 26, 2024
5 checks 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