apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "torna-server.fullname" . }} labels: {{- include "torna-server.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "torna-server.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "torna-server.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "torna-server.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: 7700 protocol: TCP livenessProbe: tcpSocket: port: 7700 readinessProbe: tcpSocket: port: 7700 env: - name: TZ value: "Asia/Shanghai" {{- toYaml .Values.extraEnvVars | nindent 12 }} volumeMounts: - name: torna-config mountPath: "/torna/config/application.properties" readOnly: true subPath: "application.properties" resources: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: torna-config configMap: defaultMode: 0600 name: torna-config {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}