Interview Prep/Helm/Chart Design & Authoring

Two releases of your chart in the same cluster collide on a ClusterRole name. How do you fix the chart?

IntermediateScenarioChart Design & Authoring
Answer

Situation read → Cluster-scoped resources are not namespaced, so a static name like shop-reader is shared by every release and the second install fails with "already exists".

What I'd do →

  1. Name cluster-scoped objects with release and namespace: {{ printf "%s-%s" .Release.Namespace (include "shop.fullname" .) | trunc 63 | trimSuffix "-" }}.
  2. Ask whether a namespaced Role is enough; prefer it.
  3. Make cluster-scoped resources optional (rbac.clusterWide: false).

Why → Unique names make the chart installable multiple times, which is a basic chart requirement.

Interview tip → Call out CRDs as the one cluster-scoped thing that should be shared, and managed separately.

All Helm questions Roadmap: Helm

More on Chart Design & Authoring