# Copyright © 2018  AT&T Intellectual Property.  All rights reserved.
#
# 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.name" . }}-{{ .Values.buscontroller.service }}
  namespace: {{ .Values.global.nsPrefix }}
  labels:
    app: {{ include "common.name" . }}-{{ .Values.buscontroller.service }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.buscontroller.replicaCount }}
  template:
    metadata:
      labels:
        app: {{ include "common.name" . }}-{{ .Values.buscontroller.service }}
        release: {{ .Release.Name }}
    spec:
      initContainers:
#Example init container for dependency checking
#      - command:
#        - /root/ready.py
#        args:
#        - --container-name
#        - mariadb
#        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" . }}-{{ .Values.buscontroller.service }}
          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image.buscontrollerImage }}:{{ .Values.image.buscontrollerVersion }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          ports:
          - containerPort: {{ .Values.buscontroller.httpExternalPort }}
# wait till we get SSL certs before enabling this port
#          - containerPort: {{ .Values.buscontroller.httpsPort }}
          # disable liveness probe when breakpoints set in debugger
          # so K8s doesn't restart unresponsive container
          {{- if eq .Values.liveness.enabled true }}
          livenessProbe:
            httpGet:
              port: {{ .Values.buscontroller.httpExternalPort }}
              path: /webapi/info
            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
            periodSeconds: {{ .Values.liveness.periodSeconds }}
          {{ end -}}
          readinessProbe:
            httpGet:
              port: {{ .Values.buscontroller.httpExternalPort }}
              path: /webapi/info
            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
            periodSeconds: {{ .Values.readiness.periodSeconds }}
          env:
#Example environment variable passed to container
#            - name: DEBUG_FLAG
#              value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }}
          volumeMounts:
          - mountPath: /etc/localtime
            name: localtime
            readOnly: true
          - mountPath: /opt/app/config
            name: {{ include "common.name" . }}-config
          resources:
{{ toYaml .Values.resources | indent 12 }}
        {{- if .Values.nodeSelector }}
        nodeSelector:
{{ toYaml .Values.nodeSelector | indent 10 }}
        {{- end -}}
        {{- if .Values.affinity }}
        affinity:
{{ toYaml .Values.affinity | indent 10 }}
        {{- end }}

      volumes:
        - name: localtime
          hostPath:
            path: /etc/localtime
        - name: {{ include "common.name" . }}-config
          configMap:
            name: {{ include "common.fullname" . }}-configmap
            items:
            - key: buscontroller.env
              path: conf
#Example config file mount into container
#        - name: {{ include "common.fullname" . }}-config
#          configMap:
#            name: {{ include "common.fullname" . }}-configmap
#            items:
#            - key: application.properties
#              path: application.properties
      imagePullSecrets:
      - name: "{{ .Values.global.nsPrefix }}-docker-registry-key"
