mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-12-29 18:20:49 +08:00
e41d8b824c
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
95 lines
3.2 KiB
YAML
Executable file
95 lines
3.2 KiB
YAML
Executable file
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: kompose convert -c -f latest.yml --namespace "{{ .Values.NAMESPACE }}"
|
|
kompose.version: 1.34.0 (cbf2835db)
|
|
labels:
|
|
io.kompose.service: nextcloud-aio-database
|
|
name: nextcloud-aio-database
|
|
namespace: "{{ .Values.NAMESPACE }}"
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: nextcloud-aio-database
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: kompose convert -c -f latest.yml --namespace "{{ .Values.NAMESPACE }}"
|
|
kompose.version: 1.34.0 (cbf2835db)
|
|
labels:
|
|
io.kompose.service: nextcloud-aio-database
|
|
spec:
|
|
initContainers:
|
|
- name: init-subpath
|
|
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine"
|
|
{{- else }}
|
|
image: alpine
|
|
{{- end }}
|
|
command:
|
|
- mkdir
|
|
- "-p"
|
|
- /nextcloud-aio-database/data
|
|
- /nextcloud-aio-database
|
|
- /nextcloud-aio-database-dump
|
|
volumeMounts:
|
|
- name: nextcloud-aio-database-dump
|
|
mountPath: /nextcloud-aio-database-dump
|
|
- name: nextcloud-aio-database
|
|
mountPath: /nextcloud-aio-database
|
|
- name: init-volumes
|
|
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine"
|
|
{{- else }}
|
|
image: alpine
|
|
{{- end }}
|
|
command:
|
|
- chown
|
|
- 999:999
|
|
- "-R"
|
|
- /nextcloud-aio-database
|
|
- /nextcloud-aio-database-dump
|
|
volumeMounts:
|
|
- name: nextcloud-aio-database-dump
|
|
mountPath: /nextcloud-aio-database-dump
|
|
- name: nextcloud-aio-database
|
|
mountPath: /nextcloud-aio-database
|
|
containers:
|
|
- env:
|
|
- name: PGTZ
|
|
value: "{{ .Values.TIMEZONE }}"
|
|
- name: POSTGRES_DB
|
|
value: nextcloud_database
|
|
- name: POSTGRES_PASSWORD
|
|
value: "{{ .Values.DATABASE_PASSWORD }}"
|
|
- name: POSTGRES_USER
|
|
value: nextcloud
|
|
- name: TZ
|
|
value: "{{ .Values.TIMEZONE }}"
|
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.NEXTCLOUD_IMAGE_ORG }}/aio-postgresql:20240606_075829-latest"
|
|
name: nextcloud-aio-database
|
|
ports:
|
|
- containerPort: 5432
|
|
protocol: TCP
|
|
securityContext:
|
|
capabilities:
|
|
drop:
|
|
- NET_RAW
|
|
volumeMounts:
|
|
- mountPath: /var/lib/postgresql/data
|
|
subPath: data
|
|
name: nextcloud-aio-database
|
|
- mountPath: /mnt/data
|
|
name: nextcloud-aio-database-dump
|
|
terminationGracePeriodSeconds: 1800
|
|
volumes:
|
|
- name: nextcloud-aio-database
|
|
persistentVolumeClaim:
|
|
claimName: nextcloud-aio-database
|
|
- name: nextcloud-aio-database-dump
|
|
persistentVolumeClaim:
|
|
claimName: nextcloud-aio-database-dump
|