Skip to content

Commit

Permalink
wip: Allow to force a pod to be restarted when updgradind the charts #…
Browse files Browse the repository at this point in the history
…287

feat: Provides helm chart for most of the components (close #281)
  • Loading branch information
cnouguier committed Mar 9, 2022
1 parent 55e92eb commit dd5ddba
Show file tree
Hide file tree
Showing 27 changed files with 84 additions and 3 deletions.
5 changes: 4 additions & 1 deletion charts/common/templates/_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
5 changes: 4 additions & 1 deletion charts/common/templates/_kdk-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
5 changes: 4 additions & 1 deletion charts/common/templates/_krawler-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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: ""
Expand Down
3 changes: 3 additions & 0 deletions charts/express-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions charts/k-centipede/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/k-hubeau-observations/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/k-hubeau-stations/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/k-metar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/k-meteoradar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/k-openaq/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/k-openradiation/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/k-taf/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/k-teleray/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/k-vigicrues/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/k2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions charts/kano/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions charts/kapp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions charts/kapture/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions charts/maputnik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions charts/mongo-express/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions charts/redis-commander/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions charts/weacast-arome-france-high-loader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/weacast-arome-france-loader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/weacast-arpege-europe-loader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/weacast-arpege-world-loader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/weacast-gfs-world-loader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * * *"

Expand Down
3 changes: 3 additions & 0 deletions charts/weacast/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dd5ddba

Please sign in to comment.