feat(helm): add commonLabels support to the kmcp chart - #142
Open
jrhuerta wants to merge 1 commit into
Open
Conversation
Adds a values.commonLabels map merged into kmcp.labels, so every
resource this chart creates (controller Deployment, ServiceAccount,
ClusterRoles/Bindings, Service) can carry operator-required labels
(e.g. an admission policy demanding specific labels on all
namespaced/cluster resources) without a fork or post-renderer.
Default (commonLabels: {}) renders byte-identical output - verified
with `helm template` diff against main.
Signed-off-by: Joaquin Rodriguez <jrhuerta@alayacare.com>
jrhuerta
force-pushed
the
jrhuerta/commonlabels-helm-chart
branch
from
September 8, 2026 17:48
6e15727 to
c2f31ef
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
values.commonLabels(default{}), merged into thekmcp.labelshelper so every resource this chart creates (controllerDeployment,ServiceAccount,ClusterRoles/ClusterRoleBindings,Service) can carry them._helpers.tpl— every resource already renders through the singlekmcp.labelsinclude point.Fixes #141.
Why
Some clusters enforce an admission policy requiring specific labels on every namespaced/cluster resource (e.g. OPA Gatekeeper's
gatekeeper-required-labels). Right now there's no way to satisfy that for this chart's own resources without a fork or a Helm post-renderer.This is a different gap than #88/#93 — those are about labels on resources generated by a deployed
MCPServercustom resource at runtime; this is about the chart's own static install-time resources.Test plan
helm templateoutput with default values (commonLabels: {}) is byte-identical tomain— verified with a diff.helm template --set commonLabels.team=platform --set commonLabels.environment=productionshows the labels applied to every resource (Deployment, ServiceAccount, ClusterRoles, ClusterRoleBindings, Service).helm-unittestsnapshots (not run locally, plugin unavailable) — should be unaffected since default output is unchanged.🤖 Generated with Claude Code