Skip to content

feat(minio): propagate global.* values to Deployment and bucket-init Job#57

Open
ixxeL2097 wants to merge 3 commits intomainfrom
fspiers/ENT-3039/minio-global-values
Open

feat(minio): propagate global.* values to Deployment and bucket-init Job#57
ixxeL2097 wants to merge 3 commits intomainfrom
fspiers/ENT-3039/minio-global-values

Conversation

@ixxeL2097
Copy link
Copy Markdown
Collaborator

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-minio in ward-runs-app), Helm auto-propagates parent global.* values but the MinIO templates didn't consume them — so setting global.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

commonLabels and commonAnnotations are kept as-is to preserve upstream sync compatibility with CloudPirates. No breaking changes.

Values added under global.*

Value Behavior Applied on
global.image.imagePullPolicy Fallback when image.imagePullPolicy is empty Deployment, bucket-init Job
global.podLabels Merged into pod templates (component wins on conflict) Deployment pod, bucket-init Job pod
global.podAnnotations Merged into pod templates (component wins on conflict) Deployment pod, bucket-init Job pod
global.nodeSelector Fallback when component nodeSelector is empty Deployment, bucket-init Job
global.tolerations Concatenated with component tolerations Deployment, bucket-init Job
global.envVars Concatenated after config.extraEnvVars Deployment container, bucket-init Job container
global.envFrom New support (no component-level equivalent) Deployment container, bucket-init Job container
global.extraVolumes Appended to pod volumes Deployment pod, bucket-init Job pod
global.extraVolumeMounts Appended to container volumeMounts Deployment container, bucket-init Job container

Implementation

  • 9 new helpers in _helpers.tpl encapsulate the merge/concat logic (minio.podLabels, minio.podAnnotations, minio.nodeSelector, minio.tolerations, minio.envVars, minio.envFrom, minio.extraVolumes, minio.extraVolumeMounts, minio.imagePullPolicy)
  • templates/deployment.yaml and templates/bucket-init-job.yaml updated to use them
  • values.yaml and values.schema.json declare the new global.* keys (all default to empty)
  • New test suite tests/globals_test.yaml — 16 tests covering all merge/override cases
  • Chart version bumped 0.13.00.14.0

Test plan

  • helm unittest charts/minio/ — all 42 tests pass (16 new + 26 pre-existing)
  • helm lint charts/minio/ — no errors
  • Verify in ward-runs-app that global.podLabels / global.podAnnotations set on parent are now propagated to loki-minio pods

@linear
Copy link
Copy Markdown

linear bot commented Apr 13, 2026

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
@ixxeL2097 ixxeL2097 force-pushed the fspiers/ENT-3039/minio-global-values branch from 37e39c4 to 512225e Compare April 13, 2026 09:47
ixxeL2097 and others added 2 commits April 13, 2026 09:47
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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