diff --git a/charts/common/templates/_deployment.yaml b/charts/common/templates/_deployment.yaml index a147249d..d5dc9675 100644 --- a/charts/common/templates/_deployment.yaml +++ b/charts/common/templates/_deployment.yaml @@ -18,6 +18,9 @@ spec: template: metadata: labels: {{- include "common.labels.standard" . | nindent 8 }} + {{- if .Values.forceRestart }} + helm.sh/restartedAt: {{ now | unixEpoch |quote }} + {{- end }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} {{- end }} @@ -33,7 +36,7 @@ spec: containers: - name: {{ include "common.names.name" . }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + imagePullPolicy: {{ ternary "Always" .Values.image.pullPolicy .Values.forceRestart }} {{- if .Values.env }} env: {{- include "common.environment.render" (dict "env" .Values.env "context" $) | indent 12 }} diff --git a/charts/common/templates/_kdk-deployment.yaml b/charts/common/templates/_kdk-deployment.yaml index 5b139e7b..6e6feb9d 100644 --- a/charts/common/templates/_kdk-deployment.yaml +++ b/charts/common/templates/_kdk-deployment.yaml @@ -18,6 +18,9 @@ spec: template: metadata: labels: {{- include "common.labels.standard" . | nindent 8 }} + {{- if .Values.forceRestart }} + helm.sh/restartedAt: {{ now | unixEpoch |quote }} + {{- end }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} {{- end }} @@ -29,7 +32,7 @@ spec: containers: - name: {{ include "common.names.name" . }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + imagePullPolicy: {{ ternary "Always" .Values.image.pullPolicy .Values.forceRestart }} env: - name: SUBDOMAIN value: {{ .Values.global.subdomain }} diff --git a/charts/common/templates/_krawler-cronjob.yaml b/charts/common/templates/_krawler-cronjob.yaml index 6c580c43..26e8c981 100644 --- a/charts/common/templates/_krawler-cronjob.yaml +++ b/charts/common/templates/_krawler-cronjob.yaml @@ -5,6 +5,9 @@ metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- if .Values.forceRestart }} + helm.sh/restartedAt: {{ now | unixEpoch |quote }} + {{- end }} {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- end }} @@ -25,7 +28,7 @@ spec: containers: - name: {{ include "common.names.name" . }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + imagePullPolicy: {{ ternary "Always" .Values.image.pullPolicy .Values.forceRestart }} env: - name: CRON value: "" diff --git a/charts/express-gateway/values.yaml b/charts/express-gateway/values.yaml index 5add4306..68cfbba7 100644 --- a/charts/express-gateway/values.yaml +++ b/charts/express-gateway/values.yaml @@ -22,6 +22,9 @@ image: tag: 1.16.9 pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + service: enabled: true type: ClusterIP diff --git a/charts/k-centipede/values.yaml b/charts/k-centipede/values.yaml index 56264340..a9dcf64a 100644 --- a/charts/k-centipede/values.yaml +++ b/charts/k-centipede/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule cron: "*/5 * * * *" diff --git a/charts/k-hubeau-observations/values.yaml b/charts/k-hubeau-observations/values.yaml index 2134313b..4982f97e 100644 --- a/charts/k-hubeau-observations/values.yaml +++ b/charts/k-hubeau-observations/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule (every 15 minutes) cron: "*/15 * * * *" diff --git a/charts/k-hubeau-stations/values.yaml b/charts/k-hubeau-stations/values.yaml index 40aa0c42..01c3f7d7 100644 --- a/charts/k-hubeau-stations/values.yaml +++ b/charts/k-hubeau-stations/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule cron: "0 0 * * *" diff --git a/charts/k-metar/values.yaml b/charts/k-metar/values.yaml index 99d8aafb..805c9715 100644 --- a/charts/k-metar/values.yaml +++ b/charts/k-metar/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule (every hour) cron: "0 * * * *" diff --git a/charts/k-meteoradar/values.yaml b/charts/k-meteoradar/values.yaml index 5c3aa5bb..e2c6df84 100644 --- a/charts/k-meteoradar/values.yaml +++ b/charts/k-meteoradar/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule (every hour) cron: "*/15 * * * *" diff --git a/charts/k-openaq/values.yaml b/charts/k-openaq/values.yaml index 5662213a..7dbab2c4 100644 --- a/charts/k-openaq/values.yaml +++ b/charts/k-openaq/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule (every hour) cron: "0 * * * *" diff --git a/charts/k-openradiation/values.yaml b/charts/k-openradiation/values.yaml index b2249b26..670aafe6 100644 --- a/charts/k-openradiation/values.yaml +++ b/charts/k-openradiation/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule (every hour) cron: "0 * * * *" diff --git a/charts/k-taf/values.yaml b/charts/k-taf/values.yaml index 8b092607..dc924e06 100644 --- a/charts/k-taf/values.yaml +++ b/charts/k-taf/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule (every hour) cron: "0 * * * *" diff --git a/charts/k-teleray/values.yaml b/charts/k-teleray/values.yaml index 005fe65a..e9d10192 100644 --- a/charts/k-teleray/values.yaml +++ b/charts/k-teleray/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule cron: "*/10 * * * *" diff --git a/charts/k-vigicrues/values.yaml b/charts/k-vigicrues/values.yaml index 640a6406..87cb335f 100644 --- a/charts/k-vigicrues/values.yaml +++ b/charts/k-vigicrues/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule cron: "0 */3 * * *" diff --git a/charts/k2/values.yaml b/charts/k2/values.yaml index 6bf90b31..8d467b3c 100644 --- a/charts/k2/values.yaml +++ b/charts/k2/values.yaml @@ -18,6 +18,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + service: enabled: true type: ClusterIP diff --git a/charts/kano/values.yaml b/charts/kano/values.yaml index d1f009c9..ba71b260 100644 --- a/charts/kano/values.yaml +++ b/charts/kano/values.yaml @@ -22,6 +22,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + service: enabled: true type: ClusterIP diff --git a/charts/kapp/values.yaml b/charts/kapp/values.yaml index 990863be..d3ca6aba 100644 --- a/charts/kapp/values.yaml +++ b/charts/kapp/values.yaml @@ -22,6 +22,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + service: enabled: true type: ClusterIP diff --git a/charts/kapture/values.yaml b/charts/kapture/values.yaml index d96e2446..1de33107 100644 --- a/charts/kapture/values.yaml +++ b/charts/kapture/values.yaml @@ -18,6 +18,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + service: enabled: true type: ClusterIP diff --git a/charts/maputnik/values.yaml b/charts/maputnik/values.yaml index 1cf5bae0..d3eb668e 100644 --- a/charts/maputnik/values.yaml +++ b/charts/maputnik/values.yaml @@ -22,6 +22,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + service: enabled: true type: ClusterIP diff --git a/charts/mongo-express/values.yaml b/charts/mongo-express/values.yaml index 325f64d4..9749d0da 100644 --- a/charts/mongo-express/values.yaml +++ b/charts/mongo-express/values.yaml @@ -22,6 +22,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + service: enabled: true type: ClusterIP diff --git a/charts/redis-commander/values.yaml b/charts/redis-commander/values.yaml index 4dbc85f3..05935151 100644 --- a/charts/redis-commander/values.yaml +++ b/charts/redis-commander/values.yaml @@ -22,6 +22,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + service: enabled: true type: ClusterIP diff --git a/charts/weacast-arome-france-high-loader/values.yaml b/charts/weacast-arome-france-high-loader/values.yaml index 1493ee9c..1c8faf8b 100644 --- a/charts/weacast-arome-france-high-loader/values.yaml +++ b/charts/weacast-arome-france-high-loader/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule cron: "10 * * * *" diff --git a/charts/weacast-arome-france-loader/values.yaml b/charts/weacast-arome-france-loader/values.yaml index 530815e6..ed55d248 100644 --- a/charts/weacast-arome-france-loader/values.yaml +++ b/charts/weacast-arome-france-loader/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule cron: "0 * * * *" diff --git a/charts/weacast-arpege-europe-loader/values.yaml b/charts/weacast-arpege-europe-loader/values.yaml index 5e67786d..35c68ded 100644 --- a/charts/weacast-arpege-europe-loader/values.yaml +++ b/charts/weacast-arpege-europe-loader/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule cron: "15 * * * *" diff --git a/charts/weacast-arpege-world-loader/values.yaml b/charts/weacast-arpege-world-loader/values.yaml index 51d6d493..128ef419 100644 --- a/charts/weacast-arpege-world-loader/values.yaml +++ b/charts/weacast-arpege-world-loader/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule cron: "10 * * * *" diff --git a/charts/weacast-gfs-world-loader/values.yaml b/charts/weacast-gfs-world-loader/values.yaml index 4b59c3a0..bb0e1709 100644 --- a/charts/weacast-gfs-world-loader/values.yaml +++ b/charts/weacast-gfs-world-loader/values.yaml @@ -15,6 +15,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + # cron specifies the job schedule cron: "20 * * * *" diff --git a/charts/weacast/values.yaml b/charts/weacast/values.yaml index 3fe5d3fe..51cab9a2 100644 --- a/charts/weacast/values.yaml +++ b/charts/weacast/values.yaml @@ -18,6 +18,9 @@ image: tag: "" pullPolicy: IfNotPresent +# forceRestart forces the pod to be restarted when upgrading the chart +forceRestart: false + service: enabled: true type: ClusterIP