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

aws-for-fluent-bit: Add extraLabels parameter, fix ServiceMonitor namespace selector #1035

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

crdrost
Copy link

@crdrost crdrost commented Dec 5, 2023

This adds an "extraLabels" parameter to add labels to an internal helper that maintains the labels for the various resources.

In my usage case, at my work, I maintain an internal framework of Helm charts and other tweaks that we deploy, and we use labels to mark in our users' clusters that these are assets we manage.

This PR also fixes a little bug I noticed in the ServiceMonitor where the Helm namespace and the fluent-bit namespace might not align, in which case metrics don't get to Prometheus, and a little inconsistency in how labels are applied to the DaemonSet vs. everything else.

Issue

I didn't open an issue for this, didn't seem big enough

Description of changes

Checklist

  • Added/modified documentation as required (such as the README.md for modified charts)
  • Incremented the chart version in Chart.yaml for the modified chart(s)
  • Manually tested. Describe what testing was done in the testing section below
  • Make sure the title of the PR is a good description that can go into the release notes

Testing

Tested with helm template . --values testvalues.yaml | tee result.yaml with several modifications in testvalues.yaml including null extraLabels, {} extraLabels (the default), and

extraLabels:
  foo: bar

and confirmed each case compiled properly.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This adds an "extraLabels" parameter to add labels to an internal helper
that maintains the labels for the various resources.

Also bumps the chart version accordingly.
This commit fixes a namespace selector in the Prometheus Operator's
ServiceMonitor definition. If you deploy the Helm release into, say, the
default namespace, but use a namespaceOverride to put Fluent Bit into
the "fluent-bit" or "cloudwatch" namespace, then this will look in the
wrong Kubernetes namespace for your service and you won't get metrics.
@crdrost crdrost changed the title aws-for-fluent-bit: Add extraLabels parameter aws-for-fluent-bit: Add extraLabels parameter, fix ServiceMonitor namespace selector Dec 8, 2023
Custom labeling should be applied to the DaemonSet too, and this is
possible only if we use the full labels instead of just the
selectorLabels.
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.

1 participant