|
| 1 | +{{- if .Values.notifyPush.enabled }} |
| 2 | +--- |
| 3 | +apiVersion: apps/v1 |
| 4 | +kind: Deployment |
| 5 | +metadata: |
| 6 | + name: {{ template "nextcloud.fullname" . }}-notify-push |
| 7 | + labels: |
| 8 | + app.kubernetes.io/name: {{ include "nextcloud.name" . }} |
| 9 | + helm.sh/chart: {{ include "nextcloud.chart" . }} |
| 10 | + app.kubernetes.io/instance: {{ .Release.Name }} |
| 11 | + app.kubernetes.io/managed-by: {{ .Release.Service }} |
| 12 | + app.kubernetes.io/component: notify-push |
| 13 | +spec: |
| 14 | + replicas: {{ .Values.notifyPush.replicaCount }} |
| 15 | + selector: |
| 16 | + matchLabels: |
| 17 | + app.kubernetes.io/name: {{ include "nextcloud.name" . }} |
| 18 | + app.kubernetes.io/instance: {{ .Release.Name }} |
| 19 | + app.kubernetes.io/component: notify-push |
| 20 | + template: |
| 21 | + metadata: |
| 22 | + annotations: |
| 23 | + {{- toYaml .Values.notifyPush.podAnnotations | nindent 8 }} |
| 24 | + labels: |
| 25 | + app.kubernetes.io/name: {{ include "nextcloud.name" . }} |
| 26 | + app.kubernetes.io/instance: {{ .Release.Name }} |
| 27 | + app.kubernetes.io/component: notify-push |
| 28 | + {{- with .Values.notifyPush.podLabels }} |
| 29 | + {{- toYaml . | nindent 8 }} |
| 30 | + {{- end }} |
| 31 | + spec: |
| 32 | + {{- with .Values.notifyPush.image.pullSecrets }} |
| 33 | + imagePullSecrets: |
| 34 | + {{- range . }} |
| 35 | + - name: {{ . }} |
| 36 | + {{- end}} |
| 37 | + {{- end }} |
| 38 | + containers: |
| 39 | + - name: notify-push |
| 40 | + {{- with .Values.notifyPush.image }} |
| 41 | + image: "{{ coalesce $.Values.global.image.registry .registry }}/{{ .repository }}:{{ .tag }}" |
| 42 | + imagePullPolicy: {{ coalesce $.Values.global.image.pullPolicy .pullPolicy }} |
| 43 | + {{- end }} |
| 44 | + imagePullPolicy: {{ .Values.metrics.image.pullPolicy }} |
| 45 | + env: |
| 46 | + - name: PORT |
| 47 | + value: "7867" |
| 48 | + - name: METRICS_PORT |
| 49 | + value: "9867" |
| 50 | + - name: DATABASE_URL |
| 51 | + valueFrom: |
| 52 | + secretKeyRef: |
| 53 | + name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf "%s-db" .Release.Name) }} |
| 54 | + key: {{ .Values.externalDatabase.existingSecret.databaseURLKey }} |
| 55 | + - name: REDIS_URL |
| 56 | + value: "redis://{{ template "nextcloud.redis.fullname" . }}-master:{{ .Values.redis.master.service.ports.redis | quote }}" |
| 57 | + - name: NEXTCLOUD_URL # deployment.namespace.svc.cluster.local |
| 58 | + value: "http{{ if .Values.notifyPush.https }}s{{ end }}://{{ template "nextcloud.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}" |
| 59 | + ports: |
| 60 | + - name: http |
| 61 | + containerPort: 7867 |
| 62 | + - name: metrics |
| 63 | + containerPort: 9867 |
| 64 | + {{- with .Values.notifyPush.resources }} |
| 65 | + resources: |
| 66 | + {{- toYaml . | nindent 12 }} |
| 67 | + {{- end }} |
| 68 | + securityContext: |
| 69 | + runAsUser: 1000 |
| 70 | + runAsNonRoot: true |
| 71 | +{{- end }} |
0 commit comments