blob: 790c07b6e3facc95f041b027badf015c8b8af79e [file] [log] [blame]
Amit Wankhede3d0bc582021-10-18 22:28:50 +05301# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
2#
Sean Condon160ec1d2022-02-08 12:58:25 +00003# SPDX-License-Identifier: Apache-2.0
Amit Wankhede3d0bc582021-10-18 22:28:50 +05304
5apiVersion: apps/v1
6kind: Deployment
7metadata:
8 name: {{ template "prom-label-proxy.fullname" . }}
9 namespace: {{ .Release.Namespace }}
10 labels:
11 name: {{ template "prom-label-proxy.fullname" . }}
12spec:
13 replicas: {{ .Values.replicaCount }}
14 selector:
15 matchLabels:
16 {{- include "prom-label-proxy.selectorLabels" . | nindent 6 }}
17 template:
18 metadata:
19 labels:
20 name: {{ template "prom-label-proxy.fullname" . }}
21 {{- include "prom-label-proxy.selectorLabels" . | nindent 8 }}
22 spec:
23 {{- with .Values.imagePullSecrets }}
24 imagePullSecrets:
25 {{- toYaml . | nindent 6 }}
26 {{- end }}
27 securityContext:
28 {{- toYaml .Values.podSecurityContext | nindent 8 }}
29 containers:
30 - name: {{ .Chart.Name }}
31 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
32 imagePullPolicy: {{ .Values.image.pullPolicy }}
33 env:
34 - name: POD_NAMESPACE
35 valueFrom:
36 fieldRef:
37 fieldPath: metadata.namespace
38 - name: POD_NAME
39 valueFrom:
40 fieldRef:
41 fieldPath: metadata.name
42 - name: POD_IP
43 valueFrom:
44 fieldRef:
45 fieldPath: status.podIP
46 - name: NODE_NAME
47 valueFrom:
48 fieldRef:
49 fieldPath: spec.nodeName
50 - name: OIDC_SERVER_URL
51 value: {{ .Values.config.openidc.issuer }}
52 args:
53 [
54 "-label={{ .Values.config.label }}",
55 "-admingroup={{ .Values.config.admingroup }}",
SeanCondon9a99c262023-01-09 17:20:49 +000056 "-upstream={{ tpl .Values.config.upstream . }}",
Amit Wankhede3d0bc582021-10-18 22:28:50 +053057 "-insecure-listen-address=0.0.0.0:{{ .Values.config.http.port }}",
58 "-config_address=$(POD_IP):{{ .Values.config.gnmi.port }}",
59 "-onos_config_url={{ .Values.config.onos_config_url }}",
60 "-key=/etc/prom-label-proxy/certs/tls.key",
61 "-cert=/etc/prom-label-proxy/certs/tls.crt",
62 "-ca=/etc/prom-label-proxy/certs/tls.cacert" ]
63 ports:
64 - name: http
65 containerPort: {{ .Values.config.http.port }}
66 - name: gnmi
67 containerPort: {{ .Values.config.gnmi.port }}
68 readinessProbe:
69 tcpSocket:
70 port: {{ .Values.config.http.port }}
71 initialDelaySeconds: 5
72 periodSeconds: 10
73 livenessProbe:
74 tcpSocket:
75 port: {{ .Values.config.http.port }}
76 initialDelaySeconds: 15
77 periodSeconds: 20
78 volumeMounts:
79 - name: secret
80 mountPath: /etc/prom-label-proxy/certs
81 readOnly: true
82 volumes:
83 - name: secret
84 secret:
85 secretName: {{ template "prom-label-proxy.fullname" . }}-secret