-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathdeployment.yaml
82 lines (71 loc) · 3.06 KB
/
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
{{- include "ocis.basicServiceTemplates" (dict "scope" . "appName" "appNameAuthMachine" "appNameSuffix" "") -}}
apiVersion: apps/v1
kind: Deployment
{{ include "ocis.metadata" . }}
spec:
{{- include "ocis.selector" . | nindent 2 }}
{{- if and (not .Values.autoscaling.enabled) (.Values.replicas) }}
replicas: {{ .Values.replicas }}
{{- end }}
{{- include "ocis.deploymentStrategy" . | nindent 2 }}
template:
{{- include "ocis.templateMetadata" (dict "scope" $ "configCheck" false) | nindent 4 }}
spec:
{{- include "ocis.serviceAccount" . | nindent 6 }}
{{- include "ocis.affinity" .Values.services.authmachine | nindent 6 }}
{{- include "ocis.securityContextAndtopologySpreadConstraints" . | nindent 6 }}
{{- include "ocis.priorityClassName" $.priorityClassName | nindent 6 }}
{{- include "ocis.hostAliases" $ | nindent 6 }}
nodeSelector: {{ toYaml $.nodeSelector | nindent 8 }}
containers:
- name: {{ .appName }}
{{- include "ocis.image" $ | nindent 10 }}
command: ["ocis"]
args: ["auth-machine", "server"]
{{- include "ocis.containerSecurityContext" . | nindent 10 }}
env:
{{- include "ocis.serviceRegistry" . | nindent 12 }}
- name: AUTH_MACHINE_LOG_COLOR
value: {{ .Values.logging.color | quote }}
- name: AUTH_MACHINE_LOG_LEVEL
value: {{ .Values.logging.level | quote }}
- name: AUTH_MACHINE_LOG_PRETTY
value: {{ .Values.logging.pretty | quote }}
- name: AUTH_MACHINE_TRACING_ENABLED
value: "{{ .Values.tracing.enabled }}"
- name: AUTH_MACHINE_TRACING_TYPE
value: {{ .Values.tracing.type | quote }}
- name: AUTH_MACHINE_TRACING_ENDPOINT
value: {{ .Values.tracing.endpoint | quote }}
- name: AUTH_MACHINE_TRACING_COLLECTOR
value: {{ .Values.tracing.collector | quote }}
- name: AUTH_MACHINE_DEBUG_PPROF
value: {{ .Values.debug.profiling | quote }}
- name: AUTH_MACHINE_GRPC_ADDR
value: 0.0.0.0:9166
- name: AUTH_MACHINE_DEBUG_ADDR
value: 0.0.0.0:9167
- name: AUTH_MACHINE_JWT_SECRET
valueFrom:
secretKeyRef:
name: {{ include "secrets.jwtSecret" . }}
key: jwt-secret
- name: AUTH_MACHINE_API_KEY
valueFrom:
secretKeyRef:
name: {{ include "secrets.machineAuthAPIKeySecret" . }}
key: machine-auth-api-key
{{- include "ocis.livenessProbe" . | nindent 10 }}
resources: {{ toYaml .resources | nindent 12 }}
ports:
- name: grpc
containerPort: 9166
- name: metrics-debug
containerPort: 9167
volumeMounts:
- name: tmp-volume
mountPath: /tmp
{{- include "ocis.imagePullSecrets" $ | nindent 6 }}
volumes:
- name: tmp-volume
emptyDir: {}