Your chart must run on OpenShift and vanilla Kubernetes. What needs care?
AdvancedScenarioChart Design & Authoring
Answer
Situation read → OpenShift's restricted SCC assigns a random UID per namespace and rejects fixed runAsUser; it also uses Routes.
What I'd do →
- Make
runAsUser/fsGroupoptional (render only when set) and ensure images work with arbitrary UIDs (group 0 writable dirs). - Detect OpenShift with
.Capabilities.APIVersions.Has "route.openshift.io/v1"and optionally render a Route. - Avoid privileged ports (<1024) and hostPath.
- Test with
helm template --api-versions route.openshift.io/v1and on a CRC or OKD cluster in CI.
Why → Platform differences belong in capability checks and values, not forks.
Interview tip → Mention arbitrary UID support as the most common OpenShift chart failure.
More on Chart Design & Authoring
Your team has 15 near-identical YAML folders, one per microservice per environment. How do you introduce Helm?BeginnerShould you build one generic chart for all microservices or one chart per service?IntermediateA developer hardcoded `namespace: production` in every template. What is wrong and how do you fix it?BeginnerChanging a ConfigMap value in the chart does not restart the pods, so the app keeps old config. What do you change?IntermediateYou need the same chart to support both Ingress and Gateway API HTTPRoute. How do you design it?IntermediateYour chart's Deployment template has grown to 300 lines of nested `if`s. How do you clean it up?Intermediate