Skip to content

Conversation

@mrobinson513
Copy link
Collaborator

Prometheus self-discovery expects annotations on pods where a /metrics endpoint is to be scraped. The metrics-server template included a conditional for this, but such was missing from operator (manager) and webhooks.

These same annotations were being applied to the metrics-server service template, which is redundant (and possibly unused by modern Prometheus) when use of ServiceMonitor is available.

Checklist

  • I have verified that my change is according to the deprecations & breaking changes policy
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • README is updated with new configuration values (if applicable) learn more
  • A PR is opened to update KEDA core (repo) (if applicable, ie. when deployment manifests are modified)

Fixes #

  • remove annotations from metrics-server service template
  • add conditional pod annotations for operator(manager) and webhooks

…service object

Signed-off-by: Mike Robinson <mrobinson@wrapbook.com>
azure.workload.identity/use: "true"
{{- end }}
{{- if or .Values.podAnnotations.keda .Values.additionalAnnotations }}
{{- if or .Values.podAnnotations.keda .Values.additionalAnnotations (and .Values.prometheus.operator.enabled ( not (or .Values.prometheus.operator.podMonitor.enabled .Values.prometheus.operator.serviceMonitor.enabled )) ) }}
Copy link

Choose a reason for hiding this comment

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

Not sure this is gonna work. I think you have to wrap the or statement in the and statement.

Copy link

Choose a reason for hiding this comment

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

nvm, looks like you copied that from a working code below.

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.

3 participants