feat(fusion): add podLabels and podAnnotations hooks#151
Open
antoniocali wants to merge 1 commit into
Open
Conversation
The other components in this chart (olake-ui, olake-worker, temporal,
postgresql, nfs-server, elasticsearch) all support `podLabels` and
`podAnnotations` value blocks that get merged into
`spec.template.metadata`. The Fusion deployment template was missing
both — its pod-template metadata was hardcoded to the
`app.kubernetes.io/*` labels and the config-checksum annotation,
with no extension point.
This matters for deployments running under K8s admission policies that
require specific labels on pod templates (Gatekeeper, Kyverno,
OPA constraints, etc.). Without a `podLabels` hook, operators either
have to live with the policy warnings or carry parent-chart patches.
Changes mirror the same pattern olake-ui/deployment.yaml already uses:
template:
metadata:
labels:
app.kubernetes.io/name: ...
...
{{- with .Values.fusion.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
checksum/fusion-config: ...
{{- with .Values.fusion.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Defaults are `{}` in values.yaml so existing deployments render
byte-identically when neither value is set.
Verified with `helm template`:
- default (no overrides) → unchanged labels/annotations
- `--set fusion.podLabels.foo=bar --set fusion.podAnnotations.alpha=beta`
→ both merged into the rendered deployment
Collaborator
|
Hello @antoniocali , is this a blocker for you? |
Contributor
Author
Hello Not a blocker at all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every other component in this chart —
olake-ui,olake-worker,temporal,postgresql,nfs-server,elasticsearch— exposespodLabelsandpodAnnotationsvalue blocks that get merged intospec.template.metadata. The Fusion deployment template is the only one missing both. Its pod-template metadata is hardcoded to theapp.kubernetes.io/*labels and the config-checksum annotation, with no operator extension point.This matters for deployments running under K8s admission policies that require specific labels on pod templates (Gatekeeper / Kyverno / OPA constraints, internal compliance tags, mesh-routing labels, etc.). Without a
podLabelshook, operators either have to live with policy warnings on the Fusion pod or carry a parent-chart patch.Real-world example: my deployment runs under a Gatekeeper
template-required-labels-warnconstraint requiringmeta.zego.tools/{managed-from, owner, service}on every pod template. I can satisfy this for olake-ui / olake-worker / temporal / postgresql via their existingpodLabelsblocks, but the Fusion pod can't be reached without forking the chart.Changes
Same pattern
olake-ui/deployment.yamlalready uses:Defaults are
{}invalues.yaml, so existing deployments render byte-identically when neither value is set.Verification
Both render as expected — no other resources touched.
Scope
Single template + matching values.yaml defaults. Mirrors existing conventions in this chart. No breaking change.