apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "helm.fullname" . }} labels: {{- include "helm.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "helm.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "helm.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "helm.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 }} {{- if .Values.app.configLocationOverride }} env: - name: GITEA_SQ_BOT_CONFIG_PATH value: "{{ .Values.app.configLocationOverride }}" {{- end}} ports: - name: http containerPort: 3000 protocol: TCP livenessProbe: httpGet: path: /ping port: http readinessProbe: httpGet: path: /ping port: http resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: sq-bot-config {{- if .Values.app.configLocationOverride }} mountPath: {{ dir .Values.app.configLocationOverride }} {{- else }} mountPath: /home/bot/config {{- end }} readOnly: true {{- if .Values.volumeMounts }} {{- toYaml .Values.volumeMounts | nindent 12 }} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} volumes: - name: sq-bot-config secret: secretName: {{ include "helm.fullname" . }} {{- if .Values.app.configLocationOverride }} items: - key: config.yaml path: {{ base .Values.app.configLocationOverride }} {{- end }} {{- if .Values.volumes }} {{- toYaml .Values.volumes | nindent 8 }} {{- end }}