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 ServiceMonitor selector #164

Merged
merged 1 commit into from
Dec 29, 2023
Merged

Conversation

joekrill
Copy link
Contributor

The selector for the ServiceMonitor currently will not match the underlying service:

selector:
    matchLabels:
      app.kubernetes.io/instance: {{ $chart }}
      prometheus: unknown
  1. app.kubernetes.io/instance: {{ $chart }} will only work if the release is named mail, because $chart is hard-coded to that value here. But that's not always the case.
  2. prometheus: unknown will cause this to never match because this label isn't applied to the underlying service (unless it is explicitly set in the values provided the helm chart).

Fixes #162

@bokysan
Copy link
Owner

bokysan commented Dec 29, 2023

Thanks for the commit, merging!

@bokysan bokysan merged commit 553874a into bokysan:master Dec 29, 2023
4 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.

ServiceMonitor is broken - selector is incorrect
2 participants