Argo CD With Helm: Charts, Values, and Versioned Releases
79%
Understanding Helm Chart Versioning
When the application code changes, bump the image tag rather than overwriting an existing one. Moving from v0 to v1 keeps each build traceable. Set the tag in your environment, appending the line if it is not there yet:
# Export the IMAGE_REGISTRY
# (for example, registry.gitlab.com/learning9042634/todo)
# if you did not export it before (in .bashrc)
# export IMAGE_REGISTRY=
# Export the IMAGE_TAG (for example, v1)
sed -i 's/IMAGE_TAG=.*/IMAGE_TAG=v1/' $HOME/.bashrc
source $HOME/.bashrc
# Docker build with the new tag
docker build -t $IMAGE_REGISTRY:$IMAGE_TAG $HOME/todo/app
# Docker push with the new tag
docker push $IMAGE_REGISTRY:$IMAGE_TAG
The new tag has to be reflected in values.yaml, since that is what the chart renders into the Deployment:
cat < $HOME/todo/app/manifests/helm/todo/values.yaml
replicaCount: 1
image:
repository: $IMAGE_REGISTRY
tag: $IMAGE_TAG
pullPolicy: IfNotPresent
service:
type: NodePort
port: 5000
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
imagePullSecrets:
- name: gitlab-registry
readinessProbe:
httpGet:
path: /tasks
port: 5000
initialDelaySeconds: 5
periodSeconds: 10
autoscaling:
enabled: false
serviceAccount:
create: false
ingress:
enabled: false
httpRoute:GitOps the Hard Way, with Argo CD
Build Real GitOps Pipelines From Empty Clusters to Automated DeploysEnroll now to unlock all content and receive all future updates for free.
