Skip to content

Commit

Permalink
control-service: add timestamps to helm chart (#2344)
Browse files Browse the repository at this point in the history
## Why?

When upgrading the vdk helm chart, helm will not pull the latest image
when using a meta tag (latest, stable, etc.). Helm treats tags as
first-class citizens and doesn't look at the image sha. If the tag
hasn't changed, then, from helm's POV, the chart hasn't changed either.
This blocks us from using latests/stable tags for our test environment
deployment. It also means quickstart-vdk will not use the latest images
if it's upgraded.

This is default helm behavior:

helm/helm#5696

Note that `--recreate-pods` is no longer a thing.

helm/helm#8271

## What?

Add timestamp labels to the control-service deployment.yaml This way,
the helm chart will always be different, which means it will always be
re-deployed.

## How was this tested?

Labels are already added to the frontend deployment.yaml and it works
when running quickstart-vdk

## What type of change are you making?

Feature/non-breaking

Signed-off-by: Dilyan Marinov <[email protected]>
  • Loading branch information
DeltaMichael authored Jul 6, 2023
1 parent e01a790 commit 6fc5008
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
{{- if .Values.deploymentAdditionalLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.deploymentAdditionalLabels "context" $) | nindent 4 }}
{{- end }}
date: "{{ now | unixEpoch }}"
spec:
replicas: {{ .Values.replicas }}
strategy:
Expand All @@ -28,6 +29,7 @@ spec:
{{- if .Values.deploymentAdditionalLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.deploymentAdditionalLabels "context" $) | nindent 8 }}
{{- end }}
date: "{{ now | unixEpoch }}"
annotations:
# https://helm.sh/docs/howto/charts_tips_and_tricks Automatically Roll Deployments
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
Expand Down

0 comments on commit 6fc5008

Please sign in to comment.