apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "joplin.fullname" . }} labels: {{- include "joplin.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "joplin.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "joplin.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "joplin.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: {{ .Values.service.port }} protocol: TCP # livenessProbe: # httpGet: # path: /api/ping # port: http # httpHeaders: # - name: Host # value: {{ .Values.joplin.baseUrl }}:{{ .Values.service.port }} # readinessProbe: # httpGet: # path: /api/ping # port: http # httpHeaders: # - name: Host # value: {{ .Values.joplin.baseUrl }}:{{ .Values.service.port }} resources: {{- toYaml .Values.resources | nindent 12 }} env: - name: APP_PORT value: {{ .Values.service.port | quote }} - name: TZ value: {{ .Values.joplin.tz }} - name: APP_BASE_URL value: {{ .Values.joplin.baseUrl }} - name: DB_CLIENT value: {{ .Values.joplin.db.type }} - name: POSTGRES_HOST value: {{ .Values.joplin.db.host }} - name: POSTGRES_PORT value: {{ .Values.joplin.db.port | quote }} - name: POSTGRES_DATABASE value: {{ .Values.joplin.db.database }} - name: POSTGRES_USER value: {{ .Values.joplin.db.user }} - name: POSTGRES_PASSWORD {{- if .Values.joplin.db.existingSecret }} valueFrom: secretKeyRef: name: {{ .Values.joplin.db.existingSecret }} key: {{ .Values.joplin.db.secretKeys.passwordKey }} {{- else }} value: {{ .Values.joplin.db.password }} {{- 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 }}