Merge "Un-hardcode restartPolicy for ks-* jobs"
This commit is contained in:
commit
f29707dea2
@ -28,6 +28,13 @@ limitations under the License.
|
|||||||
{{- $backoffLimit := index . "backoffLimit" | default "1000" -}}
|
{{- $backoffLimit := index . "backoffLimit" | default "1000" -}}
|
||||||
{{- $activeDeadlineSeconds := index . "activeDeadlineSeconds" -}}
|
{{- $activeDeadlineSeconds := index . "activeDeadlineSeconds" -}}
|
||||||
{{- $serviceNamePretty := $serviceName | replace "_" "-" -}}
|
{{- $serviceNamePretty := $serviceName | replace "_" "-" -}}
|
||||||
|
{{- $restartPolicy_ := "OnFailure" -}}
|
||||||
|
{{- if hasKey $envAll.Values "jobs" -}}
|
||||||
|
{{- if hasKey $envAll.Values.jobs "ks_endpoints" -}}
|
||||||
|
{{- $restartPolicy_ = $envAll.Values.jobs.ks_endpoints.restartPolicy | default $restartPolicy_ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $restartPolicy := index . "restartPolicy" | default $restartPolicy_ -}}
|
||||||
|
|
||||||
{{- $serviceAccountName := printf "%s-%s" $serviceNamePretty "ks-endpoints" }}
|
{{- $serviceAccountName := printf "%s-%s" $serviceNamePretty "ks-endpoints" }}
|
||||||
{{ tuple $envAll "ks_endpoints" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
{{ tuple $envAll "ks_endpoints" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
@ -49,7 +56,7 @@ spec:
|
|||||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: {{ $serviceAccountName }}
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
restartPolicy: OnFailure
|
restartPolicy: {{ $restartPolicy }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ toYaml $nodeSelector | indent 8 }}
|
{{ toYaml $nodeSelector | indent 8 }}
|
||||||
initContainers:
|
initContainers:
|
||||||
|
@ -28,6 +28,13 @@ limitations under the License.
|
|||||||
{{- $backoffLimit := index . "backoffLimit" | default "1000" -}}
|
{{- $backoffLimit := index . "backoffLimit" | default "1000" -}}
|
||||||
{{- $activeDeadlineSeconds := index . "activeDeadlineSeconds" -}}
|
{{- $activeDeadlineSeconds := index . "activeDeadlineSeconds" -}}
|
||||||
{{- $serviceNamePretty := $serviceName | replace "_" "-" -}}
|
{{- $serviceNamePretty := $serviceName | replace "_" "-" -}}
|
||||||
|
{{- $restartPolicy_ := "OnFailure" -}}
|
||||||
|
{{- if hasKey $envAll.Values "jobs" -}}
|
||||||
|
{{- if hasKey $envAll.Values.jobs "ks_service" -}}
|
||||||
|
{{- $restartPolicy_ = $envAll.Values.jobs.ks_service.restartPolicy | default $restartPolicy_ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $restartPolicy := index . "restartPolicy" | default $restartPolicy_ -}}
|
||||||
|
|
||||||
{{- $serviceAccountName := printf "%s-%s" $serviceNamePretty "ks-service" }}
|
{{- $serviceAccountName := printf "%s-%s" $serviceNamePretty "ks-service" }}
|
||||||
{{ tuple $envAll "ks_service" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
{{ tuple $envAll "ks_service" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
@ -49,7 +56,7 @@ spec:
|
|||||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: {{ $serviceAccountName }}
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
restartPolicy: OnFailure
|
restartPolicy: {{ $restartPolicy }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ toYaml $nodeSelector | indent 8 }}
|
{{ toYaml $nodeSelector | indent 8 }}
|
||||||
initContainers:
|
initContainers:
|
||||||
|
@ -28,6 +28,13 @@ limitations under the License.
|
|||||||
{{- $backoffLimit := index . "backoffLimit" | default "1000" -}}
|
{{- $backoffLimit := index . "backoffLimit" | default "1000" -}}
|
||||||
{{- $activeDeadlineSeconds := index . "activeDeadlineSeconds" -}}
|
{{- $activeDeadlineSeconds := index . "activeDeadlineSeconds" -}}
|
||||||
{{- $serviceUserPretty := $serviceUser | replace "_" "-" -}}
|
{{- $serviceUserPretty := $serviceUser | replace "_" "-" -}}
|
||||||
|
{{- $restartPolicy_ := "OnFailure" -}}
|
||||||
|
{{- if hasKey $envAll.Values "jobs" -}}
|
||||||
|
{{- if hasKey $envAll.Values.jobs "ks_user" -}}
|
||||||
|
{{- $restartPolicy_ = $envAll.Values.jobs.ks_user.restartPolicy | default $restartPolicy_ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $restartPolicy := index . "restartPolicy" | default $restartPolicy_ -}}
|
||||||
|
|
||||||
{{- $serviceAccountName := printf "%s-%s" $serviceUserPretty "ks-user" }}
|
{{- $serviceAccountName := printf "%s-%s" $serviceUserPretty "ks-user" }}
|
||||||
{{ tuple $envAll "ks_user" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
{{ tuple $envAll "ks_user" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
@ -49,7 +56,7 @@ spec:
|
|||||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: {{ $serviceAccountName | quote }}
|
serviceAccountName: {{ $serviceAccountName | quote }}
|
||||||
restartPolicy: OnFailure
|
restartPolicy: {{ $restartPolicy }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ toYaml $nodeSelector | indent 8 }}
|
{{ toYaml $nodeSelector | indent 8 }}
|
||||||
initContainers:
|
initContainers:
|
||||||
|
Loading…
Reference in New Issue
Block a user