{{- if .Values.useDeploy -}} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "uptime-kuma.fullname" . }} labels: {{- include "uptime-kuma.labels" . | nindent 4 }} spec: replicas: 1 selector: matchLabels: {{- include "uptime-kuma.selectorLabels" . | nindent 6 }} {{- if .Values.podLabels }} {{- toYaml .Values.podLabels | nindent 6 }} {{- end }} {{- with .Values.strategy }} strategy: {{- toYaml . | nindent 4 }} {{- end }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "uptime-kuma.selectorLabels" . | nindent 8 }} {{- if .Values.podLabels }} {{- toYaml .Values.podLabels | nindent 8 }} {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "uptime-kuma.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} {{- if .Values.dnsPolicy }} dnsPolicy: {{ .Values.dnsPolicy }} {{- end }} {{- if .Values.dnsConfig }} dnsConfig: {{- toYaml .Values.dnsConfig | nindent 8 }} {{- 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 }} {{- with .Values.podEnv }} env: {{- toYaml . | nindent 12 }} {{- end }} ports: - name: http containerPort: 3001 protocol: TCP {{ if or .Values.volume.enabled .Values.additionalVolumeMounts -}} volumeMounts: {{- if .Values.volume.enabled }} - mountPath: /app/data name: storage {{- end -}} {{ with .Values.additionalVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} {{- end }} {{- if .Values.livenessProbe.enabled }} livenessProbe: exec: command: - extra/healthcheck timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds}} initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds}} {{- end }} {{- if .Values.readinessProbe.enabled }} readinessProbe: httpGet: path: / port: 3001 scheme: HTTP initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds}} {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{ if or .Values.volume.enabled .Values.additionalVolumes -}} volumes: {{- if .Values.volume.enabled }} - name: storage persistentVolumeClaim: {{- if not .Values.volume.existingClaim }} claimName: {{ include "uptime-kuma.fullname" . }}-pvc {{- else }} claimName: {{ .Values.volume.existingClaim }} {{- end }} {{- end -}} {{- with .Values.additionalVolumes }} {{- toYaml . | nindent 6 }} {{- end }} {{- end -}} {{- end -}}