Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org> |
| 2 | # |
| 3 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 4 | |
| 5 | apiVersion: apps/v1 |
| 6 | kind: Deployment |
| 7 | metadata: |
| 8 | name: {{ template "subscriber-proxy.fullname" . }} |
| 9 | namespace: {{ .Release.Namespace }} |
| 10 | labels: |
| 11 | name: {{ template "subscriber-proxy.fullname" . }} |
| 12 | spec: |
| 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 Wankhede | 3843741 | 2021-11-22 11:11:07 -0600 | [diff] [blame] | 23 | serviceAccountName: subscriber-proxy |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 24 | {{- 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 Wankhede | 3843741 | 2021-11-22 11:11:07 -0600 | [diff] [blame] | 47 | - name: OIDC_SERVER_URL |
| 48 | value: {{ .Values.config.openidc.issuer }} |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 49 | args: |
| 50 | - "/usr/local/bin/subscriber-proxy" |
Amit Wankhede | 3843741 | 2021-11-22 11:11:07 -0600 | [diff] [blame] | 51 | - "-bind_port=:{{ .Values.config.port }}" |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 52 | - "-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 Wankhede | 3843741 | 2021-11-22 11:11:07 -0600 | [diff] [blame] | 57 | - "-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 Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 59 | ports: |
Amit Wankhede | 3843741 | 2021-11-22 11:11:07 -0600 | [diff] [blame] | 60 | - containerPort: {{.Values.config.port}} |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 61 | readinessProbe: |
| 62 | tcpSocket: |
Amit Wankhede | 3843741 | 2021-11-22 11:11:07 -0600 | [diff] [blame] | 63 | port: {{ .Values.config.port }} |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 64 | initialDelaySeconds: 5 |
| 65 | periodSeconds: 10 |
| 66 | livenessProbe: |
| 67 | tcpSocket: |
Amit Wankhede | 3843741 | 2021-11-22 11:11:07 -0600 | [diff] [blame] | 68 | port: {{ .Values.config.port }} |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 69 | 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 |