2017-08-07 22:07:38 +00:00
|
|
|
{{/*
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/}}
|
2017-02-17 14:18:44 +00:00
|
|
|
|
2021-03-23 11:14:46 +00:00
|
|
|
{{- define "metadata.annotations.job.ks_user" }}
|
|
|
|
helm.sh/hook: post-install,post-upgrade
|
|
|
|
helm.sh/hook-weight: "-1"
|
|
|
|
{{- end }}
|
|
|
|
|
2017-08-07 16:37:42 +00:00
|
|
|
{{- if .Values.manifests.job_ks_user }}
|
2018-02-07 15:57:22 +00:00
|
|
|
{{- $ksUserJob := dict "envAll" . "serviceName" "cinder" -}}
|
2020-06-03 17:40:40 +00:00
|
|
|
{{- if .Values.manifests.certificates -}}
|
2021-11-09 22:06:20 +00:00
|
|
|
{{- $_ := set $ksUserJob "tlsSecret" .Values.secrets.tls.volumev3.api.internal -}}
|
2020-06-03 17:40:40 +00:00
|
|
|
{{- end -}}
|
2021-03-23 11:14:46 +00:00
|
|
|
{{- if .Values.helm3_hook }}
|
|
|
|
{{- $_ := set $ksUserJob "jobAnnotations" (include "metadata.annotations.job.ks_user" . | fromYaml) }}
|
|
|
|
{{- end }}
|
2022-03-22 18:33:39 +00:00
|
|
|
{{- if .Values.pod.tolerations.cinder.enabled -}}
|
|
|
|
{{- $_ := set $ksUserJob "tolerationsEnabled" true -}}
|
|
|
|
{{- end -}}
|
2018-02-06 23:45:04 +00:00
|
|
|
{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
|
2017-08-07 16:37:42 +00:00
|
|
|
{{- end }}
|