forked from temporalio/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb-deployment.yaml
More file actions
107 lines (107 loc) · 3.89 KB
/
web-deployment.yaml
File metadata and controls
107 lines (107 loc) · 3.89 KB
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
{{- if .Values.web.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "temporal.componentname" (list $ "web") }}
annotations:
{{- include "temporal.resourceAnnotations" (list $ "web" "deployment") | nindent 4 }}
labels:
{{- include "temporal.resourceLabels" (list $ "web" "deployment") | nindent 4 }}
spec:
replicas: {{ .Values.web.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: web
{{- with .Values.web.minReadySeconds }}
minReadySeconds: {{ . }}
{{- end }}
template:
metadata:
annotations:
{{- include "temporal.resourceAnnotations" (list $ "web" "pod") | nindent 8 }}
labels:
{{- include "temporal.resourceLabels" (list $ "web" "pod") | nindent 8 }}
spec:
{{- with .Values.web.additionalInitContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ include "temporal.serviceAccount" $ }}
{{- if .Values.web.additionalVolumes }}
volumes:
{{- toYaml .Values.web.additionalVolumes | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-web
image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag }}"
imagePullPolicy: {{ .Values.web.image.pullPolicy }}
env:
- name: TEMPORAL_ADDRESS
{{- if and .Values.web.useInternalFrontend (index $.Values.server "internal-frontend").enabled }}
value: "{{ include "temporal.fullname" $ }}-internal-frontend.{{ .Release.Namespace }}.svc:{{ (index $.Values.server "internal-frontend").service.port }}"
{{- else }}
value: "{{ include "temporal.fullname" $ }}-frontend.{{ .Release.Namespace }}.svc:{{ .Values.server.frontend.service.port }}"
{{- end }}
{{- if .Values.web.additionalEnv }}
{{- toYaml .Values.web.additionalEnv | nindent 12 }}
{{- end }}
{{- if or .Values.web.additionalEnvSecretName .Values.web.additionalEnvConfigMapName }}
envFrom:
{{- if .Values.web.additionalEnvSecretName }}
- secretRef:
name: {{ .Values.web.additionalEnvSecretName }}
{{- end }}
{{- if .Values.web.additionalEnvConfigMapName }}
- configMapRef:
name: {{ .Values.web.additionalEnvConfigMapName }}
{{- end }}
{{- end }}
livenessProbe:
initialDelaySeconds: 10
tcpSocket:
port: http
{{- with .Values.web.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
{{- toYaml .Values.web.resources | nindent 12 }}
{{- with .Values.web.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.additionalVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}