{{- if .Values.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "temporal.fullname" . }} namespace: {{ include "temporal.namespace" . }} labels: {{- include "temporal.labels" . | nindent 4 }} app.kubernetes.io/component: server spec: replicas: {{ .Values.server.replicaCount }} selector: matchLabels: {{- include "temporal.selectorLabels" . | nindent 6 }} app.kubernetes.io/component: server template: metadata: annotations: {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "temporal.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: server {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: enableServiceLinks: false {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} containers: - name: temporal image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}" imagePullPolicy: {{ .Values.server.image.pullPolicy }} command: ["/bin/sh", "-c", "exec /etc/temporal/entrypoint.sh autosetup"] env: - name: DB value: "{{ .Values.temporal.db }}" - name: DB_PORT value: "{{ .Values.db.port }}" - name: POSTGRES_SEEDS value: "{{ .Values.temporal.postgresSeeds }}" - name: POSTGRES_USER value: "{{ .Values.db.adminUser }}" - name: POSTGRES_PWD valueFrom: secretKeyRef: name: {{ .Values.db.adminPasswordSecret.name }} key: {{ .Values.db.adminPasswordSecret.key }} - name: POSTGRES_HOST value: "{{ .Values.db.host }}" - name: TEMPORAL_CLI_ADDRESS value: "{{ .Values.service.name }}:{{ .Values.service.port }}" - name: DEFAULT_NAMESPACE value: "{{ .Values.temporal.namespace }}" - name: DEFAULT_NAMESPACE_RETENTION value: "{{ .Values.temporal.namespaceRetention }}" - name: SKIP_DEFAULT_NAMESPACE_CREATION value: "true" - name: SKIP_ADD_CUSTOM_SEARCH_ATTRIBUTES value: "true" ports: - name: grpc containerPort: {{ .Values.service.port }} protocol: TCP startupProbe: tcpSocket: port: grpc failureThreshold: {{ .Values.server.startupProbe.failureThreshold }} periodSeconds: {{ .Values.server.startupProbe.periodSeconds }} readinessProbe: tcpSocket: port: grpc initialDelaySeconds: {{ .Values.server.readinessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.server.readinessProbe.periodSeconds }} livenessProbe: tcpSocket: port: grpc initialDelaySeconds: {{ .Values.server.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.server.livenessProbe.periodSeconds }} resources: {{- toYaml .Values.server.resources | nindent 12 }} {{- end }}