feat: Ability to set custom labels in kubernetes resources deployed by vcluster helm chart#3617
Open
scheibinger wants to merge 3 commits intoloft-sh:mainfrom
Open
feat: Ability to set custom labels in kubernetes resources deployed by vcluster helm chart#3617scheibinger wants to merge 3 commits intoloft-sh:mainfrom
scheibinger wants to merge 3 commits intoloft-sh:mainfrom
Conversation
# Conflicts: # chart/templates/networkpolicy.yaml
FabianKramm
requested changes
Mar 4, 2026
Member
FabianKramm
left a comment
There was a problem hiding this comment.
I think what you want is a global labels similar to .Values.controlPlane.advanced.globalMetadata.annotations which fits better than reusing the statefulset labels
| {{- $labels := merge dict .Values.controlPlane.statefulSet.labels }} | ||
| {{- if $labels }} | ||
| {{ toYaml $labels | indent 4 }} | ||
| {{- end }} |
Member
There was a problem hiding this comment.
I would rather want to do .Values.controlPlane.advanced.globalMetadata.labels here than reuse the statefulSet labels on a ClusterRole
| chart: "{{ include "vcluster.version.label" $ }}" | ||
| release: "{{ .Release.Name }}" | ||
| heritage: "{{ .Release.Service }}" | ||
| {{- $labels := merge dict .Values.controlPlane.statefulSet.labels }} |
| chart: "{{ include "vcluster.version.label" $ }}" | ||
| release: "{{ .Release.Name }}" | ||
| heritage: "{{ .Release.Service }}" | ||
| {{- $labels := merge dict .Values.controlPlane.statefulSet.labels }} |
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.
What issue type does this pull request address? (keep at least one, remove the others)
/kind enhancement
What does this pull request do? Which issues does it resolve? (use
resolves #<issue_number>if possible)resolves #
Adds a way to set custom labels for kubernetes resources deployed by vcluster helm chart.
Problem: In my kubernetes environment, I need to set custom labels which are enforced by the policies in the cluster.
Please provide a short message that should be published in the vcluster release notes
Ability to set custom labels in kubernetes resources deployed by vcluster helm chart
What else do we need to know?