[bitnami/redis] bugfix: honor custom labels on PVCs#36542
Closed
initharrington wants to merge 2 commits into
Closed
[bitnami/redis] bugfix: honor custom labels on PVCs#36542initharrington wants to merge 2 commits into
initharrington wants to merge 2 commits into
Conversation
Switched PVC labels from common.labels.matchLabels to common.labels.standard so master/replica/sentinel persistence.labels and commonLabels are no longer filtered out. Fixes bitnami#36536 Signed-off-by: Sean Harrington <8240651+initharrington@users.noreply.github.com>
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
juan131
requested changes
Jun 8, 2026
juan131
left a comment
Contributor
There was a problem hiding this comment.
This would open the door for introducing mutable labels (e.g. those depending on chart version) that would break upgrading in the future given these fields are considered inmutable by K8s
|
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
|
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary. |
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.
Description of the change
Custom labels supplied via
master.persistence.labels,replica.persistence.labels,sentinel.persistence.labels, andcommonLabelswere silently dropped from rendered PVCs involumeClaimTemplates. The templates usedcommon.labels.matchLabels, which picks onlyapp.kubernetes.io/nameandapp.kubernetes.io/instanceout of the input — filtering every other user-supplied label.Switched the three PVC templates to
common.labels.standard, which merges custom labels with the standard set. This matches how every other non-selectorlabels:field in the chart is already rendered.Two adjacent bugs fixed in the same change:
.Values.master.persistence.labelsinstead of.Values.replica.persistence.labels— a copy-paste from the master template.redis-dataPVC ignoredreplica.persistence.labelsentirely, even though it inherits every other field fromreplica.persistence.*.Benefits
Custom labels on PVCs now work as documented in
values.yaml. This unblocks label-selector-based tooling (Prometheus alert routing, cost allocation, ownership tags) that previously had no way to land labels on PVCs without manually patching them post-install. Important becausevolumeClaimTemplatesare immutable after StatefulSet creation.Possible drawbacks
PVCs will now carry the full set of standard labels (
app.kubernetes.io/name,instance,managed-by,version,helm.sh/chart) plus user-supplied labels, where previously they only carriednameandinstance. Anyone with external selectors matching PVCs on the absence of those keys would be affected, but that would be an unusual setup.Applicable issues
Additional information
Validated by rendering each architecture (
standalone,replication,sentinel) with custom*.persistence.labels+commonLabelsand confirming the labels appear on the rendered PVCs. Also rendered with defaults to confirm the no-custom-labels case still produces the expected standard label set.helm lintpasses.Checklist
Chart.yamlaccording to semver. This is not necessary when the changes only affect README.md files.README.mdusing readme-generator-for-helm