blob: 2c2d346e8c315a6bc5b5476ca105c5c4f8b11eb8 [file] [log] [blame]
Scott Bakerc9d3d842021-09-17 11:32:53 -07001# 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
Scott Bakerc9d3d842021-09-17 11:32:53 -07004
5apiVersion: apps/v1
6kind: Deployment
7metadata:
8 name: {{ template "subscriber-proxy.fullname" . }}
9 namespace: {{ .Release.Namespace }}
10 labels:
11 name: {{ template "subscriber-proxy.fullname" . }}
12spec:
13 replicas: {{ .Values.replicaCount }}
14 selector:
15 matchLabels:
16 {{- include "subscriber-proxy.selectorLabels" . | nindent 6 }}
17 template:
18 metadata:
19 labels:
20 name: {{ template "subscriber-proxy.fullname" . }}
21 {{- include "subscriber-proxy.selectorLabels" . | nindent 8 }}
22 spec:
Amit Wankhede38437412021-11-22 11:11:07 -060023 serviceAccountName: subscriber-proxy
Scott Bakerc9d3d842021-09-17 11:32:53 -070024 {{- with .Values.imagePullSecrets }}
25 imagePullSecrets:
26 {{- toYaml . | nindent 6 }}
27 {{- end }}
28 securityContext:
29 {{- toYaml .Values.podSecurityContext | nindent 8 }}
30 containers:
31 - name: {{ .Chart.Name }}
32 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
33 imagePullPolicy: {{ .Values.image.pullPolicy }}
34 env:
35 - name: POD_NAMESPACE
36 valueFrom:
37 fieldRef:
38 fieldPath: metadata.namespace
39 - name: POD_NAME
40 valueFrom:
41 fieldRef:
42 fieldPath: metadata.name
43 - name: NODE_NAME
44 valueFrom:
45 fieldRef:
46 fieldPath: spec.nodeName
Amit Wankhede38437412021-11-22 11:11:07 -060047 - name: OIDC_SERVER_URL
48 value: {{ .Values.config.openidc.issuer }}
Scott Bakerc9d3d842021-09-17 11:32:53 -070049 args:
50 - "/usr/local/bin/subscriber-proxy"
Amit Wankhede38437412021-11-22 11:11:07 -060051 - "-bind_port=:{{ .Values.config.port }}"
Scott Bakerc9d3d842021-09-17 11:32:53 -070052 - "-client_key=/etc/subscriber-proxy/certs/tls.key"
53 - "-client_crt=/etc/subscriber-proxy/certs/tls.crt"
54 - "-ca_crt=/etc/subscriber-proxy/certs/tls.cacert"
55 - "-alsologtostderr"
56 - "-hostCheckDisabled"
Amit Wankhede38437412021-11-22 11:11:07 -060057 - "-webconsole_url=http://{{ .Values.config.webui_endpt.addr}}:{{ .Values.config.webui_endpt.port}}"
58 - "-onos_config_url={{ .Values.config.aether_config_endpt.addr}}:{{ .Values.config.aether_config_endpt.port}}"
Scott Bakerc9d3d842021-09-17 11:32:53 -070059 ports:
Amit Wankhede38437412021-11-22 11:11:07 -060060 - containerPort: {{.Values.config.port}}
Scott Bakerc9d3d842021-09-17 11:32:53 -070061 readinessProbe:
62 tcpSocket:
Amit Wankhede38437412021-11-22 11:11:07 -060063 port: {{ .Values.config.port }}
Scott Bakerc9d3d842021-09-17 11:32:53 -070064 initialDelaySeconds: 5
65 periodSeconds: 10
66 livenessProbe:
67 tcpSocket:
Amit Wankhede38437412021-11-22 11:11:07 -060068 port: {{ .Values.config.port }}
Scott Bakerc9d3d842021-09-17 11:32:53 -070069 initialDelaySeconds: 15
70 periodSeconds: 20
71 volumeMounts:
72 - name: secret
73 mountPath: /etc/subscriber-proxy/certs
74 readOnly: true
75 - name: logconfig
76 mountPath: /etc/onos/config
77 readOnly: true
78 volumes:
79 - name: logconfig
80 configMap:
81 name: {{ template "subscriber-proxy.fullname" . }}-logconfig
82 - name: secret
83 secret:
84 secretName: {{ template "subscriber-proxy.fullname" . }}-secret