summaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/templates/job.yaml
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2021-04-15 11:04:39 -0500
committera.sreekumar <ajith.sreekumar@bell.ca>2021-09-17 13:24:58 +0100
commitd74fe9fbe7aab6f0b9bc37bf71237b297cd63e94 (patch)
tree10062cc099953727226b8937566724c7ba5397c3 /kubernetes/policy/templates/job.yaml
parentfd229e78d5d2f260904b381631465f9d849734e4 (diff)
[POLICY] Update core images/config for m4 istanbul
New images and configuration for api, pap, distribution, pdpd, pdpx, pdpa and db components. Issue-ID: POLICY-3199 Issue-ID: POLICY-3456 Issue-ID: POLICY-3593 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I4572a3aeb8481d8d2ea671f67e105a05fc6ce1b8 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Signed-off-by: Jim Hahn <jrh3@att.com> Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Signed-off-by: Jim Hahn <jrh3@att.com> Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca> Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'kubernetes/policy/templates/job.yaml')
-rwxr-xr-xkubernetes/policy/templates/job.yaml30
1 files changed, 29 insertions, 1 deletions
diff --git a/kubernetes/policy/templates/job.yaml b/kubernetes/policy/templates/job.yaml
index 72c94f30c5..d781a634ae 100755
--- a/kubernetes/policy/templates/job.yaml
+++ b/kubernetes/policy/templates/job.yaml
@@ -1,6 +1,7 @@
{{/*
# Copyright © 2018 Amdocs, Bell Canada
# Modifications Copyright © 2020 AT&T Intellectual Property
+# Modifications Copyright (C) 2021 Nordix Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -47,7 +48,6 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- containers:
- name: {{ include "common.release" . }}-policy-galera-config
image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.mariadb.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
@@ -71,6 +71,32 @@ spec:
value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
resources:
{{ include "common.resources" . }}
+ containers:
+ - name: {{ include "common.release" . }}-policy-galera-db-migrator
+ image: {{ .Values.repository }}/{{ .Values.dbmigrator.image }}
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ volumeMounts:
+ - mountPath: /dbcmd-config/db_migrator_policy_init.sh
+ name: {{ include "common.fullname" . }}-config
+ subPath: db_migrator_policy_init.sh
+ command:
+ - /bin/sh
+ args:
+ - -x
+ - /dbcmd-config/db_migrator_policy_init.sh
+ env:
+ - name: SQL_HOST
+ value: "{{ index .Values "mariadb-galera" "service" "name" }}"
+ - name: SQL_USER
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
+ - name: SQL_PASSWORD
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
+ - name: SQL_DB
+ value: {{ .Values.dbmigrator.schema }}
+ - name: POLICY_HOME
+ value: {{ .Values.dbmigrator.policy_home }}
+ resources:
+{{ include "common.resources" . }}
restartPolicy: Never
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes:
@@ -80,3 +106,5 @@ spec:
items:
- key: db.sh
path: db.sh
+ - key: db_migrator_policy_init.sh
+ path: db_migrator_policy_init.sh