# Copyright 2020-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.ofagent.log_level . | upper }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{ template "fullname" . }}-ofagent"
  namespace: {{ .Release.Namespace }}
  {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "ofagent_deployment_labels") }}
  labels:
    {{- if hasKey .Values "extra_deployment_labels" }}
    {{- range $key, $val := .Values.extra_deployment_labels }}
    {{ $key }}: {{ $val | quote }}
    {{- end }}
    {{- end }}
    {{- if hasKey .Values "ofagent_deployment_labels" }}
    {{- range $key, $val := .Values.ofagent_deployment_labels }}
    {{ $key }}: {{ $val | quote }}
    {{- end }}
    {{- end }}
  {{- end }}
spec:
  replicas: {{ .Values.replicas.ofagent }}
  selector:
    matchLabels:
      app: ofagent
      release: {{ .Release.Name }}
  template:
    metadata:
      namespace: {{ .Release.Namespace }}
      labels:
        app: ofagent
        release: {{ .Release.Name }}
        app.kubernetes.io/name: "open-flow-agent"
        app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
        app.kubernetes.io/component: "integration"
        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 "ofagent_pod_labels" }}
        {{- range $key, $val := .Values.ofagent_pod_labels }}
        {{ $key }}: {{ $val | quote }}
        {{- end }}
        {{- end }}
    spec:
      terminationGracePeriodSeconds: 10
      {{- if .Values.securityContext.enabled }}
      securityContext:
        runAsUser: {{ .Values.securityContext.runAsUser }}
        runAsGroup: {{ .Values.securityContext.runAsGroup }}
        fsGroup: {{ .Values.securityContext.fsGroup }}
      {{- end }}
      containers:
      - name: ofagent
        image: '{{ tpl .Values.images.ofagent.registry . }}{{ tpl .Values.images.ofagent.repository . }}:{{ tpl .Values.images.ofagent.tag . }}'
        imagePullPolicy: {{ tpl .Values.images.ofagent.pullPolicy . }}
        env:
          - name: COMPONENT_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.labels['app.kubernetes.io/name']
          - name: KV_STORE_DATAPATH_PREFIX
            value: {{ .Values.global.kv_store_data_prefix }}
        args:
        - "/app/ofagent"
        {{- range .Values.services.controller }}
        - "--controller={{ tpl .address $ }}"
        {{- end }}
        - "--voltha={{ template "fullname" . }}-api.{{ .Release.Namespace }}.svc:55555"
        - "--kv_store_address={{ .Values.services.etcd.address }}"
        - "--kv_store_type=etcd"
        - "--kv_store_request_timeout=60s"
        - "--log_level={{ $log_level }}"
        - "--device-refresh-interval={{ .Values.ofagent.device_refresh_interval }}"
        - "--probe=:8080"
        - "--trace_enabled={{ .Values.global.tracing.enabled }}"
        - "--trace_agent_address={{ tpl .Values.services.tracing_agent.address . }}"
        - "--log_correlation_enabled={{ .Values.global.log_correlation.enabled }}"
        {{- if .Values.securityContext.enabled }}
        securityContext:
          allowPrivilegeEscalation: false
        {{- end }}
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 10
          periodSeconds: 5
        readinessProbe:
          httpGet:
            path: /readz
            port: 8080
          initialDelaySeconds: 10
          periodSeconds: 5
