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 service monitor label selector scope #1284

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

rmvangun
Copy link
Contributor

@rmvangun rmvangun commented Aug 6, 2024

What this PR does / why we need it:

This block in the service monitor fails to correctly use the with context:

  selector:
    matchLabels:
      {{- include "fluent-operator.selectorLabels" . | nindent 6 }}
      {{- with .Values.fluentbit.labels }}
      {{- toYaml .Values.fluentbit.labels | nindent 6}}
      {{- end }}

As a result, populating .Values.fluentbit.labels results in:

Helm install failed for release monitoring/fluent-operator with chart [email protected]: template: fluent-operator/templates/fluentbit-servicemonitor.yaml:34:24: executing "fluent-operator/templates/fluentbit-servicemonitor.yaml" at <.Values.fluentbit.labels>: nil pointer evaluating interface {}.fluentbit

Which issue(s) this PR fixes:

None, can create an issue if necessary

Does this PR introduced a user-facing change?

Fixed the helm template where the service monitor incorrectly refers to variables in a "with" block

Additional documentation, usage docs, etc.:


Signed-off-by: Ryan VanGundy <[email protected]>
@benjaminhuo benjaminhuo merged commit 9bfd859 into fluent:master Aug 6, 2024
2 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