# 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.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: adapter-open-onu
  namespace: {{ .Release.Namespace }}
  {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "openonu_deployment_labels") }}
  labels:
    {{- if hasKey .Values "extra_deployment_labels" }}
    {{- range $key, $val := .Values.extra_deployment_labels }}
    {{ $key }}: {{ $val | quote }}
    {{- end }}
    {{- end }}
    {{- if hasKey .Values "openonu_deployment_labels" }}
    {{- range $key, $val := .Values.openonu_deployment_labels }}
    {{ $key }}: {{ $val | quote }}
    {{- end }}
    {{- end }}
  {{- end }}
spec:
  replicas: {{ .Values.replicas.adapter_open_onu }}
  selector:
    matchLabels:
      app: adapter-open-onu
  template:
    metadata:
      labels:
        app: adapter-open-onu
        app.kubernetes.io/name: "adapter-open-onu"
        app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
        app.kubernetes.io/component: "adapter"
        app.kubernetes.io/part-of: "voltha"
        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 "openonu_pod_labels" }}
        {{- range $key, $val := .Values.openonu_pod_labels }}
        {{ $key }}: {{ $val | quote }}
        {{- end }}
        {{- end }}
      annotations:
        cni: "calico"
    spec:
      containers:
        - name: adapter-open-onu
          image: '{{ tpl .Values.images.adapter_open_onu.registry . }}{{ tpl .Values.images.adapter_open_onu.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_onu.tag . ) . }}'
          imagePullPolicy: {{ tpl .Values.images.adapter_open_onu.pullPolicy . }}
          args:
            - "/voltha/adapters/brcm_openomci_onu/main.py"
            - "--verbose"
            - "--kafka_adapter={{ .Values.services.kafka.adapter.service }}:{{ .Values.services.kafka.adapter.port }}"
            - "--kafka_cluster={{ .Values.services.kafka.cluster.service }}:{{ .Values.services.kafka.cluster.port }}"
            - "--core_topic=rwcore"
            - "--name=brcm_openomci_onu"
            - "--backend=etcd"
            - "--etcd={{ .Values.services.etcd.service }}:{{ .Values.services.etcd.port }}"
            - "--probe=:8080"
          readinessProbe:
            httpGet:
              path: /readz
              port: 8080
            initialDelaySeconds: 10
            periodSeconds: 5
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 10
            periodSeconds: 5
