-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathauth-api-deployment.yaml
100 lines (100 loc) · 3.91 KB
/
auth-api-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{{- if .Values.authApi.enabled }}
{{- $name := include "smartface.authApi.name" . -}}
{{- $selectorLabels := include "smartface.authApi.selectorLabels" . -}}
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: {{ $name | quote }}
labels:
{{- include "smartface.authApi.labels" . | nindent 4 }}
annotations:
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.authApi.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if not (and (or .Values.autoscaling.cron.enabled .Values.autoscaling.rmq.enabled) .Values.autoscaling.api.enabled ) }}
replicas: {{ .Values.authApi.replicas }}
{{- end }}
{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- $selectorLabels | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.authApi.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- $selectorLabels | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.authApi.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
topologySpreadConstraints:
{{- include "smartface.topologySpread" (dict "selectorLabels" $selectorLabels ) | nindent 8 }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ $name | quote }}
image: {{ include "smartface.image" (dict "local" .Values.authApi.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion) }}
imagePullPolicy: {{ .Values.authApi.image.pullPolicy }}
ports:
- name: "http"
containerPort: {{ .Values.authApi.containerPort }}
- name: {{ .Values.metrics.portName | quote }}
containerPort: {{ .Values.metrics.port }}
env:
{{- include "smartface.authenticationConfig" . | nindent 8 }}
{{- include "smartface.commonEnv" . | nindent 8 }}
{{- include "smartface.dbConfig" . | nindent 8 }}
{{- include "smartface.s3Config" . | nindent 8 }}
{{- include "smartface.rmqConfig" . | nindent 8 }}
{{- if and .Values.features.edgeStreams.enabled (or .Values.rabbitmq.enabled (not .Values.rabbitmq.mqttConfiguration.existingConfigMapName)) }}
{{- include "smartface.mqttConfig" . | nindent 8 }}
{{- end }}
{{- include "smartface.apiFeaturesConfig" . | nindent 8 }}
{{- include "smartface.statisticsPublish" . | nindent 8 }}
- name: "Multitenancy__UseMultitenancy"
value: {{ .Values.features.multitenancy.enabled | quote }}
- name: "Hosting__Host"
value: "http://0.0.0.0"
- name: "Hosting__Port"
value: {{ .Values.authApi.containerPort | quote }}
resources:
{{- toYaml .Values.authApi.resources | nindent 10 }}
volumeMounts:
{{- include "smartface.licVolumeMount" . | nindent 8 }}
{{- if and .Values.migration.enabled .Values.authApi.initMigration }}
initContainers:
{{- include "smartface.migrationInitContainer" . | nindent 6 }}
{{- end }}
volumes:
{{- include "smartface.licVolume" . | nindent 8 }}
{{- with .Values.authApi.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.authApi.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}