[INFRA-424] - feat(plane-enterprise): add standard Kubernetes recommended labels#256
[INFRA-424] - feat(plane-enterprise): add standard Kubernetes recommended labels#256sriramveeraghanta wants to merge 3 commits into
Conversation
Adds the standard Helm/Kubernetes recommended labels to every resource rendered by the plane-ce and plane-enterprise charts, addressing #135: helm.sh/chart app.kubernetes.io/name app.kubernetes.io/instance app.kubernetes.io/managed-by app.kubernetes.io/version Implementation: - New _helpers.tpl helpers "plane.chart" and "plane.commonLabels"; "plane.labelsAndAnnotations" refactored to emit the common labels and still merge any per-component labels/annotations (now called with (dict "context" $ "values" .Values.<component>)). - Common labels applied to every resource's metadata.labels (workloads, Services, ServiceAccounts, ConfigMaps, Secrets, Ingress, IngressRoutes, Middleware, Certificates, Issuers) and to Deployment/StatefulSet/Job pod templates. The existing custom "app.name" label and all spec.selector/matchLabels are intentionally left unchanged so that helm upgrade of an existing release never attempts to mutate an immutable selector. The change is purely additive to rendered output. Closes #135 Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe ChangesStandard Kubernetes Recommended Labels
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…chart to 2.7.0 Standard-labels for the community chart moved to its own PR (#257). This PR is now plane-enterprise only. Bumps plane-enterprise chart 2.6.1 -> 2.7.0.
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
What
Adds the standard Helm/Kubernetes recommended labels to every resource rendered by
plane-ceandplane-enterprise:Implementation is centralized in
templates/_helpers.tpl(both charts):plane.chartandplane.commonLabelshelpers.plane.labelsAndAnnotationsrefactored to always emit the common labels and still merge any per-componentlabels/annotations. It now takes the root context plus the component values:plane.commonLabelsis also applied inline to every other resource'smetadata.labels(Services, ServiceAccounts, ConfigMaps, Secrets, Ingress, IngressRoutes, Middleware, Certificates, Issuers) and to every Deployment/StatefulSet/Job pod template.Why
Resolves #135. The charts previously emitted only a custom
app.namelabel, so resources carried none of the standardapp.kubernetes.io/*/helm.sh/chartlabels that tooling relies on (e.g.kubectl get all -l app.kubernetes.io/instance=<release>, ArgoCD/Flux ownership, cost/inventory dashboards,helm-aware cleanup).Scope / behavior
app.namelabel and allspec.selector/spec.selector.matchLabelsare left byte-for-byte unchanged.helm upgradeof an existing release never attempts to mutate an immutablespec.selector. New labels land onmetadata.labels(mutable) and pod templates (Deployment/StatefulSet templates are mutable; the migrator/minio-bucket Jobs are already recreated each upgrade via a revision/timestamp suffix in their name).Chart.yamlversion bump — versioning is handled in your dedicated release PRs / manualworkflow_dispatch, so this leaves it to you.pi-*services, email, GCS vs bundled MinIO).Testing
All via
helm 3.18, both charts:helm lint charts/plane-ceandcharts/plane-enterprise— 0 failures.helm templatebefore vs after: every changed line is an added standard-label line (or alabels:key). Zero lines removed or modified → selectors,app.name, and all existing content are identical.local_setup=false; traefik + cert-manager; nginx ingress;pi+emailenabled;storage_provider=GCS;securityContext.enabled;airgapped.enabled): every rendered resource carries the standard labels at its top-levelmetadata.labels.labels:keys; all rendered documents parse as valid YAML.Example (
StatefulSet— selector untouched, labels added):Related
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Chores
2.7.0.