Skip to content

Commit

Permalink
update rollout behaviour (#12)
Browse files Browse the repository at this point in the history
- redeploy only if vcl content has changed (needs `rolloutDeployment: false`)
- add switch to disable auto rollout on each upgrade.
  • Loading branch information
OCH authored Sep 24, 2021
1 parent daa3d76 commit c788140
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: varnish
description: A Varnish Cache Helm chart for Kubernetes
type: application
version: 0.6.0
version: 0.6.1
appVersion: 6.4
5 changes: 5 additions & 0 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ spec:
app: {{ include "varnish.name" . }}
version: {{ .Chart.Version }}
annotations:
{{- if .Values.vcl }}
checksum/vclConfig: {{ include (print $.Template.BasePath "/vcl-configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.rolloutDeployment }}
rollme: {{ randAlphaNum 5 | quote }}
{{- end }}
{{- if and .Values.prometheus.enabled .Values.prometheus.scrape }}
prometheus.io/scrape: "true"
prometheus.io/path: "{{ .Values.prometheus.path }}"
Expand Down
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ vcl: {}
# example: vclConfigmap: my-vcl-configmap
vclConfigmap: null

# rollout deployment with each upgrade
rolloutDeployment: true

logging:
enabled: true
customOutput: null
Expand Down

0 comments on commit c788140

Please sign in to comment.