Helm Chart Deployment¶
Deployment-agnostic parameters¶
| Parameter | Purpose | Example |
|---|---|---|
RELEASE_NAME |
Helm release name | hello-world |
K8S_NAMESPACE |
Kubernetes namespace for resources | hello-world |
IMAGE_REPOSITORY |
Image repository path | tools.playground.france-identite.gouv.fr/france-titres/hello-world |
IMAGE_TAG |
Image tag to deploy | latest |
SERVICE_PORT |
Service port exposed in cluster | 5173 |
Chart structure¶
Chart root: helm-hello-world-main/
Files used for deployment behavior:
Chart.yamlvalues.yamltemplates/deployment.yamltemplates/service.yamltemplates/virtualservice.yamltemplates/hpa.yaml
Sources:
- helm-hello-world-main/Chart.yaml
- helm-hello-world-main/templates/*.yaml
Key template behavior¶
Deployment¶
- name hardcoded to
hello-world - replicas hardcoded to
1 - image uses
.Values.image.repositoryand.Values.image.tag imagePullPolicyhardcodedAlways- imagePullSecret hardcoded
harbor-registry-secret - container port hardcoded
80
Source: helm-hello-world-main/templates/deployment.yaml
Service¶
- name hardcoded
hello-world portfrom.Values.service.port(default 5173)targetPorthardcoded80
Sources:
- helm-hello-world-main/templates/service.yaml
- helm-hello-world-main/values.yaml
HPA¶
- rendered only when
.Values.autoscaling.enabled=true - references helper templates (
helm-hello-world.fullname,helm-hello-world.labels)
Source: helm-hello-world-main/templates/hpa.yaml
Caveat:
_helpers.tplis not present in this chart; enabling autoscaling may break template rendering.
Source: file scan of helm-hello-world-main/templates/
Values wired to templates¶
| Value | Default | Consumed by | Effect |
|---|---|---|---|
image.repository |
Harbor repo path | Deployment | image repository |
image.tag |
latest |
Deployment | image tag |
service.port |
5173 |
Service | service port |
autoscaling.enabled |
false |
HPA | toggles HPA template |
autoscaling.minReplicas |
1 |
HPA | min replicas |
autoscaling.maxReplicas |
100 |
HPA | max replicas |
autoscaling.targetCPUUtilizationPercentage |
80 |
HPA | CPU target |
Sources:
- helm-hello-world-main/values.yaml
- helm-hello-world-main/templates/*.yaml
Deployment commands¶
helm template "$RELEASE_NAME" ./helm-hello-world-main \
--namespace "$K8S_NAMESPACE" \
--set image.repository="$IMAGE_REPOSITORY" \
--set image.tag="$IMAGE_TAG" \
--set service.port="$SERVICE_PORT"
helm upgrade --install "$RELEASE_NAME" ./helm-hello-world-main \
--namespace "$K8S_NAMESPACE" --create-namespace \
--set image.repository="$IMAGE_REPOSITORY" \
--set image.tag="$IMAGE_TAG" \
--set service.port="$SERVICE_PORT"
Assumptions¶
- Required pull secret (
harbor-registry-secret) already exists in target namespace. - Istio CRDs exist in target cluster for VirtualService rendering/apply.
Why: chart references but does not create these dependencies.