Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deploy new pods when vcl in values or in configmap change #39

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.17.0
version: 0.18.0
appVersion: 7.2.1
14 changes: 10 additions & 4 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
{{- include "varnish.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.metrics }}
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
Expand All @@ -23,7 +23,10 @@ spec:
version: {{ .Chart.Version }}
annotations:
{{- if .Values.vcl }}
checksum/vclConfig: {{ include (print $.Template.BasePath "/vcl-configmap.yaml") . | sha256sum }}
checksum/vclConfig: {{ toJson .Values.vcl | sha256sum }}
{{- end }}
{{- if .Values.vclConfigmap }}
checksum/vclConfigmap: {{ include (print $.Template.BasePath "/vcl-configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.rolloutDeployment }}
rollme: {{ randAlphaNum 5 | quote }}
Expand Down Expand Up @@ -87,11 +90,14 @@ spec:
{{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
{{ toYaml . | indent 12 }}
{{ toYaml . | indent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
{{ toYaml . | indent 12 }}
{{ toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.lifeCycle }}
{{ toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.logging.enabled }}
- name: varnishncsa
Expand Down
2 changes: 1 addition & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ vcl: {}
vclConfigmap: null

# rollout deployment with each upgrade
rolloutDeployment: true
rolloutDeployment: false

initContainers: []

Expand Down