2017-08-07 17:07:38 -05: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-07-05 02:34:12 -05:00
|
|
|
|
2021-03-17 18:28:31 +05:45
|
|
|
{{- define "metadata.annotations.job.ks_user" }}
|
|
|
|
helm.sh/hook: post-install,post-upgrade
|
|
|
|
helm.sh/hook-weight: "-1"
|
|
|
|
{{- end }}
|
|
|
|
|
2017-08-07 11:37:42 -05:00
|
|
|
{{- if .Values.manifests.job_ks_user }}
|
2018-02-07 10:57:22 -05:00
|
|
|
{{- $ksUserJob := dict "envAll" . "serviceName" "glance" -}}
|
2021-12-02 19:17:20 +02:00
|
|
|
{{- if or .Values.manifests.certificates .Values.tls.identity -}}
|
2020-06-03 12:40:40 -05:00
|
|
|
{{- $_ := set $ksUserJob "tlsSecret" .Values.secrets.tls.image.api.internal -}}
|
|
|
|
{{- end -}}
|
2021-03-17 18:28:31 +05:45
|
|
|
{{- if .Values.helm3_hook }}
|
|
|
|
{{- $_ := set $ksUserJob "jobAnnotations" (include "metadata.annotations.job.ks_user" . | fromYaml) }}
|
|
|
|
{{- end }}
|
2022-03-22 15:33:16 -03:00
|
|
|
{{- if .Values.pod.tolerations.glance.enabled -}}
|
|
|
|
{{- $_ := set $ksUserJob "tolerationsEnabled" true -}}
|
|
|
|
{{- end -}}
|
2018-02-06 18:45:04 -05:00
|
|
|
{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
|
2017-08-07 11:37:42 -05:00
|
|
|
{{- end }}
|