feat(minio): propagate global.* values to Deployment and bucket-init Job#57
Open
feat(minio): propagate global.* values to Deployment and bucket-init Job#57
Conversation
When the MinIO chart is used as a subchart, Helm automatically propagates the parent's global.* values but the templates here do not consume them. This aligns with the convention introduced in ward-runs-app (ENT-3039): parent charts define global values once and subcharts inherit them. Added (additive only — commonLabels/commonAnnotations kept as-is to preserve upstream sync compatibility with CloudPirates): - global.image.imagePullPolicy — fallback when image.imagePullPolicy unset - global.podLabels — merged into pod templates (component wins on conflict) - global.podAnnotations — merged into pod templates (component wins on conflict) - global.nodeSelector — fallback when component nodeSelector is empty - global.tolerations — concatenated with component tolerations - global.envVars — concatenated with container env - global.envFrom — new envFrom support on all containers - global.extraVolumes — appended to pod volumes - global.extraVolumeMounts — appended to container volumeMounts Applied to both the Deployment and the bucket-init Job. New helpers in _helpers.tpl encapsulate the merge/concat logic so templates stay readable. Refs: ENT-3039
37e39c4 to
512225e
Compare
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
Aligns the MinIO chart with the
global.*convention introduced in ENT-3039 / ward-runs-app MR !22055.When used as a subchart (e.g.
loki-minioin ward-runs-app), Helm auto-propagates parentglobal.*values but the MinIO templates didn't consume them — so settingglobal.podLabels: {sidecar.istio.io/inject: "false"}on the parent had no effect on the MinIO pods.This PR makes the MinIO templates honor these globals, so configuration defined once on the parent chart applies consistently.
Scope — additive only
commonLabelsandcommonAnnotationsare kept as-is to preserve upstream sync compatibility with CloudPirates. No breaking changes.Values added under
global.*global.image.imagePullPolicyimage.imagePullPolicyis emptyglobal.podLabelsglobal.podAnnotationsglobal.nodeSelectornodeSelectoris emptyglobal.tolerationstolerationsglobal.envVarsconfig.extraEnvVarsglobal.envFromglobal.extraVolumesglobal.extraVolumeMountsImplementation
_helpers.tplencapsulate the merge/concat logic (minio.podLabels,minio.podAnnotations,minio.nodeSelector,minio.tolerations,minio.envVars,minio.envFrom,minio.extraVolumes,minio.extraVolumeMounts,minio.imagePullPolicy)templates/deployment.yamlandtemplates/bucket-init-job.yamlupdated to use themvalues.yamlandvalues.schema.jsondeclare the newglobal.*keys (all default to empty)tests/globals_test.yaml— 16 tests covering all merge/override cases0.13.0→0.14.0Test plan
helm unittest charts/minio/— all 42 tests pass (16 new + 26 pre-existing)helm lint charts/minio/— no errorsglobal.podLabels/global.podAnnotationsset on parent are now propagated to loki-minio pods