apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "vikunja.fullname" . }} labels: {{- include "vikunja.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "vikunja.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "vikunja.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "vikunja.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} {{- if not (empty .Values.extraVolumes ) }} volumes: {{- toYaml .Values.extraVolumes | nindent 8 }} {{- end }} {{- if not (empty .Values.initContainers)}} initContainers: {{- toYaml .Values.initContainers | nindent 10}} {{- end }} 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: {{ .Values.service.port }} protocol: TCP livenessProbe: httpGet: path: /api/v1/info port: http readinessProbe: httpGet: path: /api/v1/info port: http resources: {{- toYaml .Values.resources | nindent 12 }} env: - name: VIKUNJA_LOG_LEVEL value: {{ .Values.config.log.level }} - name: VIKUNJA_LOG_HTTP value: {{ .Values.config.log.http | quote }} {{- if .Values.config.cache.enabled }} - name: VIKUNJA_CACHE_ENABLED value: {{ .Values.config.cache.enabled | quote }} - name: VIKUNJA_CACHE_TYPE value: {{ .Values.config.cache.type }} - name: VIKUNJA_CACHE_MAXELEMENTSIZE value: {{ .Values.config.cache.maxElementSize | quote }} - name: VIKUNJA_REDIS_ENABLED value: {{ .Values.config.cache.redis.enabled | quote }} - name: VIKUNJA_REDIS_HOST value: {{ .Values.config.cache.redis.host }} {{- end }} - name: VIKUNJA_DATABASE_TYPE value: {{ .Values.config.db.type }} - name: VIKUNJA_DATABASE_HOST value: {{ .Values.config.db.host }} - name: VIKUNJA_DATABASE_DATABASE value: {{ .Values.config.db.database }} - name: VIKUNJA_DATABASE_PASSWORD {{- if .Values.config.db.existingSecret }} valueFrom: secretKeyRef: name: {{ .Values.config.db.existingSecret }} key: {{ .Values.config.db.secretKeys.dbPasswordKey }} {{- else }} value: {{ .Values.config.db.password }} {{- end }} - name: VIKUNJA_DATABASE_USER value: {{ .Values.config.db.user }} - name: VIKUNJA_SERVICE_PUBLICURL value: {{ .Values.config.publicUrl }} {{- if .Values.config.mailer.enabled }} - name: VIKUNJA_MAILER_ENABLED value: {{ .Values.config.mailer.enabled | quote }} - name: VIKUNJA_MAILER_HOST value: {{ .Values.config.mailer.host }} - name: VIKUNJA_MAILER_PORT value: {{ .Values.config.mailer.port | quote }} - name: VIKUNJA_MAILER_AUTHTYPE value: {{ .Values.config.mailer.authtype }} - name: VIKUNJA_MAILER_PASSWORD {{- if .Values.config.mailer.existingSecret }} valueFrom: secretKeyRef: name: {{ .Values.config.mailer.existingSecret }} key: {{ .Values.config.mailer.secretKeys.passwordSecretKey }} {{- else }} value: {{ .Values.config.mailer.password }} {{- end }} - name: VIKUNJA_MAILER_USERNAME value: {{ .Values.config.mailer.username }} - name: VIKUNJA_MAILER_FROMEMAIL value: {{ .Values.config.mailer.fromemail }} - name: VIKUNJA_MAILER_FORCESSL value: {{ .Values.config.mailer.force_ssl | quote }} {{- end }} {{- if not (empty .Values.extraEnv) }} {{- toYaml .Values.extraEnv | nindent 12 }} {{- end }} {{- if not (empty .Values.extraVolumeMounts) }} volumeMounts: {{- toYaml .Values.extraVolumeMounts | 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 }}