# Copyright © 2018 Amdocs, Bell Canada
# Copyright © 2020 Samsung Electronics
#
# 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.

apiVersion: batch/v1
kind: Job
metadata:
  name: {{ include "common.fullname" . }}-galera-config
  namespace: {{ include "common.namespace" . }}
  labels:
    app: {{ include "common.name" . }}-job
    release: {{ include "common.release" . }}
spec:
  template:
    metadata:
      labels:
        app: {{ include "common.name" . }}-job
        release: {{ include "common.release" . }}
    spec:
      initContainers:
#This container checks that all galera instances are up before initializing it.
      - name: {{ include "common.name" . }}-readiness
        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        command:
        - /root/ready.py
        - --container-name
        - {{ index .Values "mariadb-galera" "service" "name" }}
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
      containers:
      - name: {{ include "common.name" . }}-job
        image: {{ .Values.mariadb_image }}
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        volumeMounts:
        - mountPath: /dbcmd-config/db_cmd.sh
          name: {{ include "common.fullname" . }}-config
          subPath: db_cmd.sh
        - mountPath: /db-config/vid-pre-init.sql
          name: {{ include "common.fullname" . }}-config
          subPath: vid-pre-init.sql
        command:
        - /bin/sh
        args:
        - -x
        - /dbcmd-config/db_cmd.sh
        env:
        - name: MYSQL_PASSWORD
          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "vid-db-user-secret" "key" "password") | indent 10 }}
        - name: MYSQL_HOST
          value: {{ index .Values "mariadb-galera" "service" "name" }}
        - name: MYSQL_USER
          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "vid-db-user-secret" "key" "login") | indent 10 }}
        - name: MYSQL_PORT
          value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
      restartPolicy: Never
      volumes:
        - name: {{ include "common.fullname" . }}-config
          configMap:
            name: {{ include "common.fullname" . }}
            items:
              - key: db_cmd.sh
                path: db_cmd.sh
              - key: vid-pre-init.sql
                path: vid-pre-init.sql
