# Copyright © 2017 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: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ include "common.fullname" . }}
  namespace: {{ include "common.namespace" . }}
  labels:
    app: {{ include "common.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ include "common.release" . }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    metadata:
      labels:
        app: {{ include "common.name" . }}
        release: {{ include "common.release" . }}
    spec:
      initContainers:
      - command:
        - /root/job_complete.py
        args:
        - --job-name
        - {{ include "common.fullname" . }}-galera-config
        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 }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          ports:
          - containerPort: {{ .Values.service.internalPort }}
          # disable liveness probe when breakpoints set in debugger
          # so K8s doesn't restart unresponsive container
          {{- if eq .Values.liveness.enabled true }}
          livenessProbe:
            tcpSocket:
              port: {{ .Values.service.internalPort }}
            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
            periodSeconds: {{ .Values.liveness.periodSeconds }}
          {{ end -}}
          readinessProbe:
            tcpSocket:
              port: {{ .Values.service.internalPort }}
            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
            periodSeconds: {{ .Values.readiness.periodSeconds }}
          env:
            - name: ASDC_CLIENT_REST_HOST
              value: sdc-be.{{ include "common.namespace" . }}
            - name: ASDC_CLIENT_REST_AUTH
              value: "{{ .Values.config.asdcclientrestauth }}"
            - name: ASDC_CLIENT_REST_PORT
              value: "{{ .Values.config.asdcclientrestport }}"
            - name: ASDC_CLIENT_REST_PROTOCOL
              value: "https"
            - name: VID_AAI_URL
              value: https://aai.{{ include "common.namespace" . }}:{{ .Values.config.vidaaiport }}
            - name: VID_ECOMP_SHARED_CONTEXT_REST_URL
              value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/context
            - name: VID_MSO_SERVER_URL
              value: http://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }}/onap/so/infra
            - name: VID_MSO_PASS
              value: "{{ .Values.config.vidmsopass }}"
            - name: MSO_DME2_SERVER_URL
              value: "{{ .Values.config.msodme2serverurl }}"
            - name: MSO_DME2_ENABLED
              value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }}
            - name: VID_ECOMP_REDIRECT_URL
              value: https://{{ .Values.config.portalhost }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm
            - name: VID_ECOMP_REST_URL
              value: https://portal-app:{{ .Values.config.onapportrest }}/ONAPPORTAL/auxapi
            - name: VID_ROLE_ACCESS_CENTRALIZED
              value: "{{ .Values.config.roleaccesscentralized }}"
            - name: VID_CONTACT_US_LINK
              value: "{{ .Values.config.vidcontactuslink }}"
            - name: VID_KEYSTORE_PASSWORD
              value: {{ .Values.config.vidkeystorepassword | quote }}
            - name: VID_UEB_URL_LIST
              value: message-router.{{ include "common.namespace" . }}
            - name: VID_MYSQL_HOST
              value: {{ index .Values "mariadb-galera" "service" "name" }}
            - name: VID_MYSQL_PORT
              value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
            - name: VID_MYSQL_DBNAME
              value: {{ index .Values "mariadb-galera" "config" "mysqlDatabase" }}
            - name: VID_MYSQL_USER
              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "login") | indent 14 }}
            - name: VID_MYSQL_PASS
              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "password") | indent 14 }}
            - name: VID_MYSQL_MAXCONNECTIONS
              value: "{{ .Values.config.vidmysqlmaxconnections }}"
          volumeMounts:
          - mountPath: /opt/app/vid/etc
            name: vid-certs
          - mountPath: /etc/localtime
            name: localtime
            readOnly: true
          - mountPath: /var/log/onap
            name: vid-logs
          - mountPath: /tmp/logback.xml
            name: vid-logback
            subPath: logback.xml
          resources:
{{ include "common.resources" . | indent 12 }}
        {{- if .Values.nodeSelector }}
        nodeSelector:
{{ toYaml .Values.nodeSelector | indent 10 }}
        {{- end -}}
        {{- if .Values.affinity }}
        affinity:
{{ toYaml .Values.affinity | indent 10 }}
        {{- end }}
      # side car containers
        - name: filebeat-onap
          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          volumeMounts:
          - mountPath: /usr/share/filebeat/filebeat.yml
            name: filebeat-conf
            subPath: filebeat.yml
          - mountPath: /var/log/onap
            name: vid-logs
          - mountPath: /usr/share/filebeat/data
            name: vid-data-filebeat
      volumes:
        - name: vid-certs
          secret:
            secretName: {{ include "common.fullname" . }}-certs
        - name: localtime
          hostPath:
            path: /etc/localtime
        - name: filebeat-conf
          configMap:
            name: {{ include "common.fullname" . }}-filebeat-configmap
        - name: vid-logs
          emptyDir: {}
        - name: vid-data-filebeat
          emptyDir: {}
        - name: vid-logback
          configMap:
            name: {{ include "common.fullname" . }}-log-configmap
      imagePullSecrets:
      - name: "{{ include "common.namespace" . }}-docker-registry-key"
