apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "freshrss.fullname" . }} labels: {{- include "freshrss.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "freshrss.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "freshrss.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "freshrss.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 env: - name: TZ value: {{ .Values.timezone }} # {{- if .Values.externalPostgresql.enabled }} # {{- with .Values.externalPostgresql }} # - name: FRESHRSS_INSTALL # value: | # --api_enabled # --base_url ${BASE_URL} # --db-base ${DB_BASE} # --db-host ${DB_HOST} # --db-password ${DB_PASSWORD} # --db-type pgsql # --db-user ${DB_USER} # --default_user admin # --language en # {{- end }} # {{- end }} livenessProbe: httpGet: path: / port: http readinessProbe: httpGet: path: / port: http resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: freshrss-data mountPath: /var/www/FreshRSS/data volumes: - name: freshrss-data {{- if .Values.persistence.enabled }} persistentVolumeClaim: claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "freshrss.fullname" . }}-freshrss{{- end }} {{- else }} emptyDir: {} {{- 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 }}