-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstation-deployment.yaml
137 lines (135 loc) · 5.21 KB
/
station-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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{{- if .Values.station.enabled }}
{{- $name := include "smartface.station.name" . -}}
{{- $selectorLabels := include "smartface.station.selectorLabels" . -}}
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: {{ $name | quote }}
labels:
{{- include "smartface.station.labels" . | nindent 4 }}
annotations:
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.station.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: 1
{{- 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.station.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- $selectorLabels | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.station.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.station.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion) }}
imagePullPolicy: {{ .Values.station.image.pullPolicy }}
env:
{{- include "smartface.apiFeaturesConfig" . | nindent 8 }}
- name: "HOST"
value: "0.0.0.0"
- name: "PORT"
value: {{ .Values.station.containerPort | quote }}
- name: "CORE_API_ROOT"
{{- if .Values.readonlyApi.enabled }}
value: "http://{{ .Values.readonlyApi.authName }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.authApi.servicePort }}/api/v1"
{{- else }}
value: "http://{{ include "smartface.authApi.name" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.authApi.servicePort }}/api/v1"
{{- end }}
- name: "ZERO_MQ_HOST"
value: "{{ include "smartface.base.name" . }}.{{ .Release.Namespace }}.svc.cluster.local"
- name: "ZERO_MQ_PORT"
value: "{{ .Values.base.zmqServicePort }}"
- name: "GRAPHQL_ROOT"
value: "http://{{ include "smartface.graphqlApi.name" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.graphqlApi.servicePort }}/graphql"
- name: "ACCESS_CONTROLLER_ADDRESS"
value: "{{ include "smartface.accessController.name" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.accessController.servicePort }}"
- name: "BLACKLIST_WATCHLIST_IDS"
value: ""
- name: "KEYCLOAK_ADMIN_URL"
value: ""
- name: "DOT_FACE_CAMERA_ENABLED"
value: "true"
- name: "IDENTIFICATION_ENABLED"
value: "true"
- name: "AUTH0_AUTHENTICATION_ENABLED"
valueFrom:
configMapKeyRef:
name: {{ .Values.configurations.stationAuth.configName | quote }}
key: "use_auth"
- name: "AUTH0_AUDIENCE"
valueFrom:
configMapKeyRef:
name: {{ .Values.configurations.stationAuth.configName | quote }}
key: "audience"
- name: "AUTH0_DOMAIN"
valueFrom:
configMapKeyRef:
name: {{ .Values.configurations.stationAuth.configName | quote }}
key: "domain"
- name: "AUTH0_ISSUER"
valueFrom:
configMapKeyRef:
name: {{ .Values.configurations.stationAuth.configName | quote }}
key: "issuer"
- name: "AUTH0_JWKS_URI"
valueFrom:
configMapKeyRef:
name: {{ .Values.configurations.stationAuth.configName | quote }}
key: "jwks_uri"
- name: "AUTH_HEADER"
valueFrom:
configMapKeyRef:
name: {{ .Values.configurations.stationAuth.configName | quote }}
key: "auth_header"
- name: "AUTH0_CLIENT_ID"
valueFrom:
secretKeyRef:
name: {{ .Values.configurations.stationAuth.secretName | quote }}
key: "client_id"
resources:
{{- toYaml .Values.station.resources | nindent 10 }}
volumeMounts:
{{- include "smartface.licVolumeMount" . | nindent 8 }}
volumes:
{{- include "smartface.licVolume" . | nindent 8 }}
{{- with .Values.station.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.station.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end}}