Scott Baker | e3090f0 | 2022-05-31 15:51:41 -0700 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2022-present Intel Corporation |
| 2 | # SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org> |
| 3 | # |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | |
| 6 | apiVersion: apps/v1 |
| 7 | kind: Deployment |
| 8 | metadata: |
| 9 | name: {{ template "fabric-adapter.fullname" . }} |
| 10 | namespace: {{ .Release.Namespace }} |
| 11 | labels: |
| 12 | name: {{ template "fabric-adapter.fullname" . }} |
| 13 | spec: |
| 14 | replicas: {{ .Values.replicaCount }} |
| 15 | selector: |
| 16 | matchLabels: |
| 17 | {{- include "fabric-adapter.selectorLabels" . | nindent 6 }} |
| 18 | template: |
| 19 | metadata: |
| 20 | labels: |
| 21 | name: {{ template "fabric-adapter.fullname" . }} |
| 22 | {{- include "fabric-adapter.selectorLabels" . | nindent 8 }} |
Ray Milkey | cd9f8d1 | 2022-08-09 12:27:09 -0700 | [diff] [blame] | 23 | annotations: |
| 24 | broker.atomix.io/inject: "true" |
| 25 | raft.storage.atomix.io/inject: "true" |
Scott Baker | e3090f0 | 2022-05-31 15:51:41 -0700 | [diff] [blame] | 26 | spec: |
| 27 | {{- with .Values.imagePullSecrets }} |
| 28 | imagePullSecrets: |
| 29 | {{- toYaml . | nindent 6 }} |
| 30 | {{- end }} |
Ray Milkey | cd9f8d1 | 2022-08-09 12:27:09 -0700 | [diff] [blame] | 31 | serviceAccountName: {{ template "fabric-adapter.fullname" . }} |
Scott Baker | e3090f0 | 2022-05-31 15:51:41 -0700 | [diff] [blame] | 32 | securityContext: |
| 33 | {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 34 | containers: |
| 35 | - name: {{ .Chart.Name }} |
SeanCondon | e9d41ad | 2022-07-12 19:04:48 +0100 | [diff] [blame] | 36 | image: "{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}" |
Scott Baker | e3090f0 | 2022-05-31 15:51:41 -0700 | [diff] [blame] | 37 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 38 | env: |
| 39 | - name: POD_NAMESPACE |
| 40 | valueFrom: |
| 41 | fieldRef: |
| 42 | fieldPath: metadata.namespace |
| 43 | - name: POD_NAME |
| 44 | valueFrom: |
| 45 | fieldRef: |
| 46 | fieldPath: metadata.name |
| 47 | - name: NODE_NAME |
| 48 | valueFrom: |
| 49 | fieldRef: |
| 50 | fieldPath: spec.nodeName |
| 51 | args: |
| 52 | - "/usr/local/bin/fabric-adapter" |
| 53 | - "-bind_address=:{{ .Values.ports.gnmi.secure }}" |
| 54 | - "-key=/etc/fabric-adapter/certs/tls.key" |
| 55 | - "-cert=/etc/fabric-adapter/certs/tls.crt" |
| 56 | - "-ca=/etc/fabric-adapter/certs/tls.cacert" |
| 57 | - "-alsologtostderr" |
| 58 | - "-hostCheckDisabled" |
| 59 | {{ if .Values.defaultTarget }} |
| 60 | - "-default_target={{ .Values.defaultTarget }}" |
| 61 | {{ end }} |
| 62 | {{ if not .Values.partialUpdateEnabled }} |
| 63 | - "-partial_update_disable" |
| 64 | {{ end }} |
| 65 | {{ if .Values.kafkaURI }} |
| 66 | - "-kafka_uri={{ .Values.kafkaURI }}" |
| 67 | {{ end }} |
| 68 | ports: |
| 69 | {{- range $key, $port := .Values.ports.gnmi }} |
| 70 | - name: gnmi{{ $key }} |
| 71 | containerPort: {{ $port }} |
| 72 | {{- end}} |
| 73 | readinessProbe: |
| 74 | tcpSocket: |
| 75 | port: {{ .Values.ports.gnmi.secure }} |
| 76 | initialDelaySeconds: 5 |
| 77 | periodSeconds: 10 |
| 78 | livenessProbe: |
| 79 | tcpSocket: |
| 80 | port: {{ .Values.ports.gnmi.secure }} |
| 81 | initialDelaySeconds: 15 |
| 82 | periodSeconds: 20 |
| 83 | volumeMounts: |
| 84 | - name: secret |
| 85 | mountPath: /etc/fabric-adapter/certs |
| 86 | readOnly: true |
| 87 | - name: logconfig |
| 88 | mountPath: /etc/onos/config |
| 89 | readOnly: true |
| 90 | volumes: |
| 91 | - name: logconfig |
| 92 | configMap: |
| 93 | name: {{ template "fabric-adapter.fullname" . }}-logconfig |
| 94 | - name: secret |
| 95 | secret: |
| 96 | secretName: {{ template "fabric-adapter.fullname" . }}-secret |
Ray Milkey | cd9f8d1 | 2022-08-09 12:27:09 -0700 | [diff] [blame] | 97 | - name: config |
| 98 | configMap: |
| 99 | name: {{ template "fabric-adapter.fullname" . }}-config |