Add support for specifying restart policy
This commit is contained in:
parent
4b245b1d09
commit
d9c1000ab8
|
@ -37,11 +37,23 @@
|
||||||
description: "Upgrade Policy"
|
description: "Upgrade Policy"
|
||||||
label: "Update Strategy"
|
label: "Update Strategy"
|
||||||
schema:
|
schema:
|
||||||
- type: string
|
type: string
|
||||||
default: "RollingUpdate"
|
default: "RollingUpdate"
|
||||||
enum:
|
enum:
|
||||||
- "RollingUpdate"
|
- "RollingUpdate"
|
||||||
- "Recreate"
|
- "Recreate"
|
||||||
|
|
||||||
|
# Restart Policy
|
||||||
|
- variable: restartPolicy
|
||||||
|
description: "Restart Policy for workload"
|
||||||
|
label: "Restart Policy"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "Always"
|
||||||
|
enum:
|
||||||
|
- "Always"
|
||||||
|
- "OnFailure"
|
||||||
|
- "Never"
|
||||||
|
|
||||||
# Configurable CMD / Entrypoint / Environment Variables
|
# Configurable CMD / Entrypoint / Environment Variables
|
||||||
- variable: containerCommand
|
- variable: containerCommand
|
||||||
|
|
|
@ -5,6 +5,8 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "ix-chart.labels" . | nindent 4 }}
|
{{- include "ix-chart.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: {{ .Values.updateStrategy }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "ix-chart.selectorLabels" . | nindent 6 }}
|
{{- include "ix-chart.selectorLabels" . | nindent 6 }}
|
||||||
|
@ -18,7 +20,7 @@ spec:
|
||||||
k8s.v1.cni.cncf.io/networks: {{ join ", " .Values.ixExternalInterfacesConfigurationNames }}
|
k8s.v1.cni.cncf.io/networks: {{ join ", " .Values.ixExternalInterfacesConfigurationNames }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
strategy: {{ .Values.updateStrategy }}
|
restartPolicy: {{ .Values.restartPolicy | quote }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
{{- if or .Values.hostPathVolumes .Values.persistentVolumeClaims }}
|
{{- if or .Values.hostPathVolumes .Values.persistentVolumeClaims }}
|
||||||
|
|
|
@ -10,6 +10,9 @@ image:
|
||||||
# Update strategy
|
# Update strategy
|
||||||
updateStrategy: "RollingUpdate"
|
updateStrategy: "RollingUpdate"
|
||||||
|
|
||||||
|
# Restart Policy
|
||||||
|
restartPolicy: "Always"
|
||||||
|
|
||||||
# Container CMD / entrypoint
|
# Container CMD / entrypoint
|
||||||
containerCommand: []
|
containerCommand: []
|
||||||
containerArgs: []
|
containerArgs: []
|
||||||
|
|
Loading…
Reference in New Issue