peridot/infrastructure/dev-helm/temporal/templates/web-deployment.yaml

88 lines
3.2 KiB
YAML
Raw Normal View History

2022-07-07 20:11:50 +00:00
{{- if .Values.web.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "temporal.componentname" (list . "web") }}
labels:
app.kubernetes.io/name: {{ include "temporal.name" . }}
helm.sh/chart: {{ include "temporal.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" }}
app.kubernetes.io/component: web
app.kubernetes.io/part-of: {{ .Chart.Name }}
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
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "temporal.name" . }}
helm.sh/chart: {{ include "temporal.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" }}
app.kubernetes.io/component: web
app.kubernetes.io/part-of: {{ .Chart.Name }}
2024-03-11 19:20:43 +00:00
{{- with .Values.web.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
2022-07-07 20:11:50 +00:00
{{- with .Values.web.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{ include "temporal.serviceAccount" . }}
volumes:
- name: {{ .Chart.Name }}-web-config
configMap:
name: {{ include "temporal.componentname" (list . "web") }}-config
2024-03-11 19:20:43 +00:00
{{- if .Values.web.additionalVolumes }}
{{- toYaml .Values.web.additionalVolumes | nindent 8 }}
{{- end }}
2022-07-07 20:11:50 +00:00
containers:
- name: {{ .Chart.Name }}-web
image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag }}"
imagePullPolicy: {{ .Values.web.image.pullPolicy }}
env:
2024-03-11 19:20:43 +00:00
- name: TEMPORAL_ADDRESS
2022-07-07 20:11:50 +00:00
value: "{{ include "temporal.fullname" . }}-frontend.{{ .Release.Namespace }}.svc:{{ .Values.server.frontend.service.port }}"
2024-03-11 19:20:43 +00:00
{{- if .Values.web.additionalEnv }}
{{- toYaml .Values.web.additionalEnv | nindent 12 }}
{{- end }}
2022-07-07 20:11:50 +00:00
ports:
- name: http
2024-03-11 19:20:43 +00:00
containerPort: 8080
2022-07-07 20:11:50 +00:00
protocol: TCP
resources:
{{- toYaml .Values.web.resources | nindent 12 }}
2024-03-11 19:20:43 +00:00
{{- 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 }}
2022-07-07 20:11:50 +00:00
{{- 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 }}
{{- end }}