blob: cbe2c43c9994f7df9b0bb6b0fa489033cae803e1 [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: {{ include "aether-roc-api.fullname" . }}
9 namespace: {{ .Release.Namespace }}
10 labels:
11 {{- include "aether-roc-api.labels" . | nindent 4 }}
12spec:
13 replicas: {{ .Values.replicaCount }}
14 selector:
15 matchLabels:
16 name: {{ template "aether-roc-api.fullname" . }}
17 app: aether
18 type: api
19 resource: {{ template "aether-roc-api.fullname" . }}
20 {{- include "aether-roc-api.selectorLabels" . | nindent 6 }}
21 template:
22 metadata:
23 labels:
24 name: {{ template "aether-roc-api.fullname" . }}
25 app: aether
26 type: api
27 resource: {{ template "aether-roc-api.fullname" . }}
28 {{- include "aether-roc-api.selectorLabels" . | nindent 8 }}
29 spec:
30 serviceAccountName: aether-roc-api
31 securityContext:
32 {{- toYaml .Values.podSecurityContext | nindent 8 }}
33 {{- with .Values.imagePullSecrets }}
34 imagePullSecrets:
35 {{- toYaml . | nindent 8 }}
36 {{- end }}
37 containers:
38 - name: {{ .Chart.Name }}
39 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
40 imagePullPolicy: {{ .Values.image.pullPolicy }}
41 env:
42 - name: NAMESPACE
43 valueFrom:
44 fieldRef:
45 fieldPath: metadata.namespace
Sean Condon2a3b5b72021-10-06 13:29:03 +010046 - name: OIDC_SERVER_URL
47 value: {{ .Values.openidc.issuer }}
Scott Bakerc9d3d842021-09-17 11:32:53 -070048 args:
49 {{- range $key, $corsorigin := .Values.corsOrigins }}
50 - {{ printf "-allowCorsOrigin=%s" $corsorigin }}{{end}}
51 ports:
52 - name: http
53 containerPort: 8181
54 startupProbe:
55 tcpSocket:
56 port: 8181
57 periodSeconds: 5
58 failureThreshold: 60
59 readinessProbe:
60 tcpSocket:
61 port: 8181
62 initialDelaySeconds: 10
63 periodSeconds: 10
64 livenessProbe:
65 tcpSocket:
66 port: 8181
67 initialDelaySeconds: 10
68 periodSeconds: 10
69 volumeMounts:
70 - name: secret
71 mountPath: /etc/aether-roc-api/certs
72 readOnly: true
73 - name: config
74 mountPath: /etc/onos/config
75 readOnly: true
76 resources:
77 {{- toYaml .Values.resources | nindent 12 }}
78 # Enable ptrace for debugging
79 securityContext:
80 {{- if .Values.debug }}
81 capabilities:
82 add:
83 - SYS_PTRACE
84 {{- end }}
Scott Bakerc9d3d842021-09-17 11:32:53 -070085 volumes:
86 - name: secret
87 secret:
88 secretName: {{ template "aether-roc-api.fullname" . }}-secret
89 - name: config
90 configMap:
91 name: {{ template "aether-roc-api.fullname" . }}-config
92 {{- with .Values.nodeSelector }}
93 nodeSelector:
94 {{- toYaml . | nindent 8 }}
95 {{- end }}
96 {{- with .Values.affinity }}
97 affinity:
98 {{- toYaml . | nindent 8 }}
99 {{- end }}
100 {{- with .Values.tolerations }}
101 tolerations:
102 {{- toYaml . | nindent 8 }}
103 {{- end }}