Platform guide
Golden-Path Helm Chart¶
Stage 4 adds a reusable Helm application contract at platform/helm-charts/golden-path. The chart is intended for ordinary HTTP services that need predictable Kubernetes defaults, GitOps delivery, and clear review boundaries.
The chart is not a service generator, image build system, policy engine, observability stack, or environment promotion model. Those capabilities remain later-stage work.
Version Boundary¶
The authoritative Helm validation tool contract is platform/helm-charts/versions.env.
- Helm:
v3.21.0 - kubeconform:
v0.7.0 - Kubernetes schema target for rendered manifests:
1.35.5
Helm 3 is used because the Stage 3 Argo CD control plane renders Helm applications through Helm 3. The repository may detect newer local Helm clients, but Stage 4 validation expects the pinned Helm 3 release until the platform control plane intentionally changes.
Chart Scope¶
The chart renders:
- Deployment
- Service
- ServiceAccount
- ConfigMap for non-secret configuration
- PodDisruptionBudget when enabled
- HorizontalPodAutoscaler when enabled
- NetworkPolicy when enabled
- Ingress when enabled
The chart does not render Kubernetes Secret resources. Secret integration is limited to references to existing Secrets through existingSecret.envFrom and existingSecret.env. Secret creation, external secret synchronization, and secret rotation are future platform concerns.
Runtime Profile¶
The runtime demonstration profile is platform/helm-charts/golden-path/tests/values/runtime-kind.yaml. It deploys the Kubernetes agnhost netexec test server with an immutable image digest, two replicas, HTTP probes, resource requests and limits, restricted security contexts, a Service, a ConfigMap, a ServiceAccount, a PodDisruptionBudget, and scheduling spread guidance.
The feature-complete profile is platform/helm-charts/golden-path/tests/values/feature-complete.yaml. It renders optional HPA, NetworkPolicy, Ingress, and existing Secret references without creating any Secret.
The feature-complete profile sets networkPolicy.ingress.fromNamespaces to ingress-nginx so the rendered NetworkPolicy admits ingress controller traffic.
The invalid profiles prove that unsafe values are rejected:
invalid-image.yamluses a floatinglatesttag and fails schema validation.invalid-autoscaling.yamlsetsautoscaling.maxReplicaslower thanautoscaling.minReplicasand fails rendering.invalid-privileged.yamlsetssecurityContext.privileged: trueand fails schema validation.invalid-ingress-networkpolicy.yamlenables Ingress and NetworkPolicy withoutnetworkPolicy.ingress.fromNamespacesand fails rendering.
Workload Safety Rules¶
- Replicas and autoscaling: the Deployment sets
spec.replicasfromreplicaCountonly whenautoscaling.enabledis false. When autoscaling is enabled, the HorizontalPodAutoscaler owns the replica count, so Argo CD self-heal does not reset replicas the autoscaler has changed. - Replica bounds: when autoscaling is enabled, rendering fails if
autoscaling.maxReplicasis lower thanautoscaling.minReplicas. - Privileged containers: the values schema requires
securityContext.privilegedto be false when set, soprivileged: trueis rejected. - NetworkPolicy ingress sources:
networkPolicy.ingress.sameNamespacekeeps the rule that admits pods in the release namespace.networkPolicy.ingress.fromNamespaces(default[]) lists namespace names; when it is not empty, the NetworkPolicy adds one ingress rule that allows TCP on the container port from pods in those namespaces, selected by thekubernetes.io/metadata.namelabel. - Ingress with NetworkPolicy: when
ingress.enabledandnetworkPolicy.enabledare both true,networkPolicy.ingress.fromNamespacesmust list the ingress controller namespace. Rendering fails when it is empty, because the NetworkPolicy would otherwise block the ingress controller.
Static Validation¶
Run the repository baseline without a cluster:
Run Helm-specific static validation with the pinned Helm and kubeconform versions available on PATH:
make helm-validate performs strict Helm linting, rejects the invalid values fixtures, renders the runtime and feature-complete profiles, validates rendered Kubernetes resources through kubeconform, and checks chart structure with repository assertions.
GitOps Runtime Validation¶
Stage 4 deploys through Argo CD. It does not use helm install as the runtime proof.
Create and validate the local platform foundation:
Bootstrap the golden-path application from the default tracked revision:
Bootstrap against a specific reviewed commit:
The revision may be main or a full lowercase 40-character commit SHA. CI uses the exact pull-request head SHA for both checkout and Argo CD target revision.
Safe Removal¶
Remove only Stage 4 runtime state:
The delete command removes the golden-path-demo Application, the golden-path AppProject, and the golden-path-demo namespace. It then verifies that the Stage 3 GitOps control plane and the Stage 2 Kind cluster remain healthy. It does not remove Argo CD, the platform-bootstrap Application, the Kind cluster, Docker resources, unrelated namespaces, local branches, or remote branches.
Runtime Evidence¶
make golden-path-validate proves:
- Argo CD reports the Application as Healthy and Synced
- the Deployment rolls out successfully
- pods are Ready
- the runtime image is digest-pinned
- pod and container security contexts are restricted
- the Service selector matches the Deployment selector
- ready EndpointSlice endpoints exist
- the Service returns an HTTP health response
- expected ConfigMap data is present
- the PodDisruptionBudget exists
Troubleshooting¶
If Helm validation fails locally, confirm that Helm v3.21.0 and kubeconform v0.7.0 are on PATH. The repository intentionally does not install arbitrary system-wide tooling.
If runtime validation refuses to continue because of the Kubernetes context, switch back to kind-idp-local. The scripts intentionally refuse to operate against any other cluster.
If Argo CD does not sync the application, inspect:
make golden-path-status
kubectl -n argocd describe application golden-path-demo --context kind-idp-local
kubectl -n golden-path-demo get pods --context kind-idp-local