blob: b05418e6ad80e0a0637d4c9867c1e5d2c09969a0 [file] [log] [blame]
Scott Bakere3090f02022-05-31 15:51:41 -07001# 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
6apiVersion: apps/v1
7kind: Deployment
8metadata:
9 name: {{ template "fabric-adapter.fullname" . }}
10 namespace: {{ .Release.Namespace }}
11 labels:
12 name: {{ template "fabric-adapter.fullname" . }}
13spec:
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 Milkeycd9f8d12022-08-09 12:27:09 -070023 annotations:
24 broker.atomix.io/inject: "true"
25 raft.storage.atomix.io/inject: "true"
Scott Bakere3090f02022-05-31 15:51:41 -070026 spec:
27 {{- with .Values.imagePullSecrets }}
28 imagePullSecrets:
29 {{- toYaml . | nindent 6 }}
30 {{- end }}
Ray Milkeycd9f8d12022-08-09 12:27:09 -070031 serviceAccountName: {{ template "fabric-adapter.fullname" . }}
Scott Bakere3090f02022-05-31 15:51:41 -070032 securityContext:
33 {{- toYaml .Values.podSecurityContext | nindent 8 }}
34 containers:
35 - name: {{ .Chart.Name }}
SeanCondone9d41ad2022-07-12 19:04:48 +010036 image: "{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}"
Scott Bakere3090f02022-05-31 15:51:41 -070037 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 Milkeycd9f8d12022-08-09 12:27:09 -070097 - name: config
98 configMap:
99 name: {{ template "fabric-adapter.fullname" . }}-config