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: |
| 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: NODE_NAME |
| 43 | valueFrom: |
| 44 | fieldRef: |
| 45 | fieldPath: spec.nodeName |
| 46 | args: |
| 47 | - "/usr/local/bin/subscriber-proxy" |
| 48 | - "-bind_port=:{{ .Values.ports.port }}" |
| 49 | - "-client_key=/etc/subscriber-proxy/certs/tls.key" |
| 50 | - "-client_crt=/etc/subscriber-proxy/certs/tls.crt" |
| 51 | - "-ca_crt=/etc/subscriber-proxy/certs/tls.cacert" |
| 52 | - "-alsologtostderr" |
| 53 | - "-hostCheckDisabled" |
| 54 | - "-webconsole_url=http://{{ .Values.ports.webui_endpt.addr}}:{{ .Values.ports.webui_endpt.port}}" |
| 55 | - "-onos_config_url={{ .Values.ports.aether_config_endpt.addr}}:{{ .Values.ports.aether_config_endpt.port}}" |
| 56 | ports: |
| 57 | - containerPort: {{.Values.ports.port}} |
| 58 | readinessProbe: |
| 59 | tcpSocket: |
| 60 | port: {{ .Values.ports.port }} |
| 61 | initialDelaySeconds: 5 |
| 62 | periodSeconds: 10 |
| 63 | livenessProbe: |
| 64 | tcpSocket: |
| 65 | port: {{ .Values.ports.port }} |
| 66 | initialDelaySeconds: 15 |
| 67 | periodSeconds: 20 |
| 68 | volumeMounts: |
| 69 | - name: secret |
| 70 | mountPath: /etc/subscriber-proxy/certs |
| 71 | readOnly: true |
| 72 | - name: logconfig |
| 73 | mountPath: /etc/onos/config |
| 74 | readOnly: true |
| 75 | volumes: |
| 76 | - name: logconfig |
| 77 | configMap: |
| 78 | name: {{ template "subscriber-proxy.fullname" . }}-logconfig |
| 79 | - name: secret |
| 80 | secret: |
| 81 | secretName: {{ template "subscriber-proxy.fullname" . }}-secret |