Skip to content

feat(helm): add commonLabels support to the kmcp chart - #142

Open
jrhuerta wants to merge 1 commit into
kagent-dev:mainfrom
jrhuerta:jrhuerta/commonlabels-helm-chart
Open

feat(helm): add commonLabels support to the kmcp chart#142
jrhuerta wants to merge 1 commit into
kagent-dev:mainfrom
jrhuerta:jrhuerta/commonlabels-helm-chart

Conversation

@jrhuerta

@jrhuerta jrhuerta commented Sep 8, 2026

Copy link
Copy Markdown

Summary

  • Adds values.commonLabels (default {}), merged into the kmcp.labels helper so every resource this chart creates (controller Deployment, ServiceAccount, ClusterRoles/ClusterRoleBindings, Service) can carry them.
  • No template needed changing beyond _helpers.tpl — every resource already renders through the single kmcp.labels include 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 MCPServer custom resource at runtime; this is about the chart's own static install-time resources.

Test plan

  • helm template output with default values (commonLabels: {}) is byte-identical to main — verified with a diff.
  • helm template --set commonLabels.team=platform --set commonLabels.environment=production shows the labels applied to every resource (Deployment, ServiceAccount, ClusterRoles, ClusterRoleBindings, Service).
  • Existing helm-unittest snapshots (not run locally, plugin unavailable) — should be unaffected since default output is unchanged.

🤖 Generated with Claude Code

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
jrhuerta force-pushed the jrhuerta/commonlabels-helm-chart branch from 6e15727 to c2f31ef Compare September 8, 2026 17:48
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.

[FEATURE] kmcp Helm chart's own controller resources have no commonLabels/extraLabels hook

1 participant