# Copyright 2019-present Open Networking Foundation
#
# 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.
{{- $log_level := tpl .Values.rw_core.log_level . | upper }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{ template "fullname" . }}-rw-core"
  namespace: {{ .Release.Namespace }}
  {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "rw_core_deployment_labels") }}
  labels:
    {{- if hasKey .Values "extra_deployment_labels" }}
    {{- range $key, $val := .Values.extra_deployment_labels }}
    {{ $key }}: {{ $val | quote }}
    {{- end }}
    {{- end }}
    {{- if hasKey .Values "rw_core_deployment_labels" }}
    {{- range $key, $val := .Values.rw_core_deployment_labels }}
    {{ $key }}: {{ $val | quote }}
    {{- end }}
    {{- end }}
  {{- end }}
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rw-core
      release: {{ .Release.Name }}
  template:
    metadata:
      namespace: {{ .Release.Namespace }}
      labels:
        app: rw-core
        release: {{ .Release.Name }}
        app.kubernetes.io/name: "read-write-core"
        app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
        app.kubernetes.io/component: "core"
        app.kubernetes.io/part-of: "voltha"
        app.kubernetes.io/stack: "{{ .Values.global.stack_name }}"
        app.kubernetes.io/managed-by: {{ quote .Release.Service }}
        helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
        {{- if hasKey .Values "extra_pod_labels" }}
        {{- range $key, $val := .Values.extra_pod_labels }}
        {{ $key }}: {{ $val | quote }}
        {{- end }}
        {{- end }}
        {{- if hasKey .Values "rw_core_pod_labels" }}
        {{- range $key, $val := .Values.rw_core_pod_labels }}
        {{ $key }}: {{ $val | quote }}
        {{- end }}
        {{- end }}
    spec:
      {{- if .Values.securityContext.enabled }}
      securityContext:
        runAsUser: {{ .Values.securityContext.runAsUser }}
        runAsGroup: {{ .Values.securityContext.runAsGroup }}
        fsGroup: {{ .Values.securityContext.fsGroup }}
      {{- end }}
      containers:
        - name: voltha
          image: '{{ tpl .Values.images.rw_core.registry . }}{{ tpl .Values.images.rw_core.repository . }}:{{ tpl .Values.images.rw_core.tag . }}'
          imagePullPolicy: {{ tpl .Values.images.rw_core.pullPolicy . }}
          env:
            - name: NAMESPACE
              value: voltha
            - name: POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: COMPONENT_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.labels['app.kubernetes.io/name']
            - name: KV_STORE_DATAPATH_PREFIX
              value: {{ tpl .Values.rw_core.kv_store_data_prefix . }}
          args:
            - "/app/rw_core"
            - "--kv_store_type=etcd"
            - "--kv_store_address={{ tpl .Values.services.etcd.address . }}"
            - "--grpc_address=0.0.0.0:50057"
            - "--banner"
            - "--kafka_adapter_address={{ tpl .Values.services.kafka.adapter.address . }}"
            - "--kafka_cluster_address={{ tpl .Values.services.kafka.cluster.address . }}"
            - "--rw_core_topic={{ tpl .Values.rw_core.topics.core_topic . }}"
            - "--event_topic={{ .Values.rw_core.topics.event_topic }}"
            - "--core_timeout={{ tpl .Values.rw_core.core_timeout . }}"
            - "--timeout_long_request={{ tpl .Values.rw_core.timeout_long_request . }}"
            - "--timeout_request={{ tpl .Values.rw_core.timeout_request . }}"
            - "--log_level={{ $log_level }}"
            - "--probe_address=:8080"
            - "--trace_enabled={{ .Values.global.tracing.enabled }}"
            - "--trace_agent_address={{ tpl .Values.services.tracing_agent.address . }}"
            - "--log_correlation_enabled={{ .Values.global.log_correlation.enabled }}"
            - "--stack_id={{ tpl .Values.rw_core.stack_id . }}"
          ports:
            - containerPort: 50057
              name: grpc
          {{- if .Values.securityContext.enabled }}
          securityContext:
            allowPrivilegeEscalation: false
          {{- end }}
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 3
            periodSeconds: 3
          readinessProbe:
            httpGet:
              path: /readz
              port: 8080
            initialDelaySeconds: 3
            periodSeconds: 3
          resources:
            requests:
              {{- if .Values.resources.rw_core.requests.memory }}
              memory: {{ .Values.resources.rw_core.requests.memory }}
              {{- end }}
              {{- if .Values.resources.rw_core.requests.cpu }}
              cpu: {{ .Values.resources.rw_core.requests.cpu }}
              {{- end }}
            limits:
              {{- if .Values.resources.rw_core.limits.memory }}
              memory: {{ .Values.resources.rw_core.limits.memory }}
              {{- end }}
              {{- if .Values.resources.rw_core.limits.cpu }}
              cpu: {{ .Values.resources.rw_core.limits.cpu }}
              {{- end }}
      affinity:
        podAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            {{- if .Values.scheduleRules.preferStackPodsOnSameNode }}
            - podAffinityTerm:
                topologyKey: kubernetes.io/hostname
                labelSelector:
                  matchExpressions:
                    - key: app.kubernetes.io/stack
                      operator: In
                      values:
                        - {{ .Values.global.stack_name }}
              weight: 100
            {{- end }}
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            {{- if .Values.scheduleRules.preferStacksOnDifferentNodes }}
            - podAffinityTerm:
                topologyKey: kubernetes.io/hostname
                labelSelector:
                  matchExpressions:
                    - key: app.kubernetes.io/name
                      operator: In
                      values:
                        - read-write-core
              weight: 100
            {{- end }}
