aws-for-fluent-bit: add serviceAnnotations and daemonSetAnnotations - #1361
aws-for-fluent-bit: add serviceAnnotations and daemonSetAnnotations#1361ranyhb wants to merge 1 commit into
Conversation
The chart can annotate the pods (annotations) and the ServiceAccount, but
neither the Service nor the DaemonSet object itself. service.yaml renders no
metadata.annotations block at all, and .Values.annotations is applied at
spec.template.metadata.
Adds two top-level values following aws-load-balancer-controller in this repo,
which already ships serviceAnnotations/deploymentAnnotations. Both default to
{} and are guarded with 'with', so rendering is unchanged for existing users.
1ca2a72 to
9e3eaed
Compare
|
@cdirubbio hi, can u take a look ? |
|
@cdirubbio @wweiwei-li @shraddhabang — sorry for the direct ping. CODEOWNERS for this chart resolves to TL;DR: |
|
@viveksb007 can u take a look ? small pr |
|
@cdirubbio @shraddhabang @jaydeokar — mind taking a look? Small PR (+18/-1). Adds |
|
@cdirubbio hi, can you take a look? Small PR (+18/-1). |
Issue
No open issue. Related: #1305 (podLabels) is the complementary change — see Scope below.
Description of changes
The chart can annotate the pods (
annotations) and the ServiceAccount(
serviceAccount.annotations), but there is no way to annotate the two objectsthemselves:
templates/service.yamlrenders nometadata.annotationsblock at all.templates/daemonset.yamlrenders.Values.annotationsatspec.template.metadata, i.e. on the pods — the DaemonSet object's ownmetadata takes only
name/namespace/labels.That blocks the ordinary uses of object annotations — IaC/controller hints,
prometheus.io/*on the Service, ArgoCD sync options, external-dns. In our casea Pulumi deployment needs
pulumi.com/skipAwaiton both objects and has topost-process the rendered manifests to get it.
This adds two values, following
aws-load-balancer-controllerin this repo,which already ships exactly this pair:
serviceAnnotationsServicedaemonSetAnnotationsDaemonSetitself (pods stay onannotations)Both are top-level, matching
aws-load-balancer-controller'sserviceAnnotations/deploymentAnnotations. Noteservice.annotationswas notan option: the top-level
service:key is the Fluent Bit[SERVICE]configstanza, not the Kubernetes Service.
For reference, the community
fluent/helm-chartsfluent-bitchart alreadysupports annotations and labels on both objects; this brings the AWS chart
closer to parity.
Scope
Deliberately does not touch
podLabels— that is #1305, which I have notduplicated. The two changes are independent and compose cleanly.
Checklist
README.mdfor modified charts)versioninChart.yamlfor the modified chart(s)Testing
helm template, chartversionheld equal so only the template change is compared:serviceAnnotations+daemonSetAnnotationssetmetadata.annotationsblockshelm lintpasses. Existing users see no change: both keys default to{}andeach block is guarded with
{{- with }}.