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

fixing prometheus rules integration for operator and additionalLabels #962

Merged
merged 1 commit into from
Jun 9, 2021
Merged

fixing prometheus rules integration for operator and additionalLabels #962

merged 1 commit into from
Jun 9, 2021

Conversation

skuethe
Copy link
Contributor

@skuethe skuethe commented Jun 3, 2021

Hi there,

this PR addresses multiple problems I was facing during evaluation deployment:

  • the PrometheusRule custom resource was not recognized and automatically loaded from the Prometheus Operator (kube-prometheus-stack), because the release label is missing
  • I was unable to use additionalLabels on that custom resource, because it was only implemented for the ServiceMonitor custom resource
  • Trying to use additionalLabels on the ServiceMonitor custom resource did not work - there seems to be some type mixtures and implementation issues in the helm template

The fixes include:

  • renaming prometheus.enableAlerting to prometheus.prometheusRule to more accurately represent the custom resource we deploy (file templates/prometheusrule.yml with kind: PrometheusRule)
  • keep validating against .Values.prometheus.enableAlerting for backwards compatibility
  • add additional configuration options to prometheus.prometheusRule (more or less same as used in prometheus.serviceMonitor)
  • fixing usage of prometheus.serviceMonitor.additionalLabels
  • updating all documentation I could find about these settings
  • also updating scripts and CI files

I am unsure about the versioning you use for Chart.yaml (and if maybe you generate it from some CI pipeline?), so I did not yet bump the chart version. Give me a hint if I should do this manually.

Signed-off-by: skuethe <56306041+skuethe@users.noreply.github.com>
@joshulyne
Copy link
Collaborator

joshulyne commented Jun 9, 2021

I am unsure about the versioning you use for Chart.yaml (and if maybe you generate it from some CI pipeline?), so I did not yet bump the chart version. Give me a hint if I should do this manually.

this is automated through one of our github actions!

thanks so much for contributing/fixing a lot of this! lgtm!

@joshulyne joshulyne merged commit 6bb2601 into kuberhealthy:master Jun 9, 2021
@skuethe skuethe deleted the bug/fix-prom-rules-integration-and-labels branch June 9, 2021 20:50
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.

None yet

2 participants