# Copyright © 2018 AT&T USA
#
# 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: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ include "common.fullname" . }}
  namespace: {{ include "common.namespace" . }}
  labels:
    app: {{ include "common.fullname" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
spec:
  replicas: {{ index .Values.replicaCount }}
  minReadySeconds: {{ index .Values.minReadySeconds }}
  strategy:
    type: {{ index .Values.updateStrategy.type }}
    rollingUpdate:
      maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
      maxSurge: {{ index .Values.updateStrategy.maxSurge }}
  template:
    metadata:
      labels:
        app: {{ include "common.name" . }}
        release: {{ .Release.Name }}
    spec:
      initContainers:
      - command:
        - /root/ready.py
        args:
        - --container-name
        - {{ .Values.mariadb.nameOverride }}
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        name: {{ include "common.name" . }}-readiness
      containers:
      - name: {{ include "common.name" . }}
        image: {{ include "common.repository" . }}/{{ .Values.image }}
        resources:
{{ include "common.resources" . | indent 12 }}
        env:
        - name: DB_HOST
          valueFrom:
            secretKeyRef:
              name: {{ .Release.Name}}-so-db-secrets
              key: mariadb.readwrite.host
        - name: DB_PORT
          valueFrom:
            secretKeyRef:
              name: {{ .Release.Name}}-so-db-secrets
              key: mariadb.readwrite.port
        - name: DB_USERNAME
          valueFrom:
            secretKeyRef:
              name: {{ .Release.Name}}-so-db-secrets
              key: mariadb.readwrite.rolename
        - name: DB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: {{ .Release.Name}}-so-db-secrets
              key: mariadb.readwrite.password
        - name: DB_ADMIN_USERNAME
          valueFrom:
            secretKeyRef:
              name: {{ .Release.Name}}-so-db-secrets
              key: mariadb.admin.rolename
        - name: DB_ADMIN_PASSWORD
          valueFrom:
            secretKeyRef:
              name: {{ .Release.Name}}-so-db-secrets
              key: mariadb.admin.password
        envFrom:
        - configMapRef:
            name: {{ include "common.fullname" . }}-configmap
        imagePullPolicy:  {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        volumeMounts:
        - name: logs
          mountPath: /app/logs
        - name: config
          mountPath: /app/config
          readOnly: true
        livenessProbe:
          httpGet:
            path: {{- index .Values.livenessProbe.path|indent 2}}
            port: {{ index .Values.containerPort }}
            scheme: {{- index .Values.livenessProbe.scheme| indent 2}}
          initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
          periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
          timeoutSeconds: {{ index .Values.livenessProbe.timeoutSeconds}}
          successThreshold: {{ index .Values.livenessProbe.successThreshold}}
          failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
        ports:
        - containerPort: {{ index .Values.containerPort }}
          name: {{ .Values.service.portName }}
          protocol: TCP
      volumes:
      - name: logs
        emptyDir: {}
      - name: config
        configMap:
            name: {{ include "common.fullname" . }}-app-configmap
      imagePullSecrets:
        - name: "{{ include "common.namespace" . }}-docker-registry-key"
