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-04-21 02:53:51 +00:00
|
|
|
|
2021-03-24 09:44:54 +00:00
|
|
|
{{- define "metadata.annotations.job.db_sync" }}
|
|
|
|
helm.sh/hook: post-install,post-upgrade
|
|
|
|
helm.sh/hook-weight: "-4"
|
|
|
|
{{- end }}
|
|
|
|
|
2017-08-28 15:35:53 +00:00
|
|
|
{{- if .Values.manifests.job_db_sync }}
|
2021-03-24 09:44:54 +00:00
|
|
|
{{- $dbSyncJob := dict "envAll" . "serviceName" "magnum" "podVolMounts" .Values.pod.mounts.magnum_db_sync.magnum_db_sync.volumeMounts "podVols" .Values.pod.mounts.magnum_db_sync.magnum_db_sync.volumes "jobAnnotations" (include "metadata.annotations.job.db_sync" . | fromYaml) -}}
|
2018-02-15 17:40:04 +00:00
|
|
|
{{ $dbSyncJob | include "helm-toolkit.manifests.job_db_sync" }}
|
2017-08-07 16:37:42 +00:00
|
|
|
{{- end }}
|