2022-12-22 20:29:31 +08:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
annotations:
|
2024-12-16 18:40:10 +08:00
|
|
|
kompose.version: 1.35.0 (9532ceef3)
|
2022-12-22 20:29:31 +08:00
|
|
|
labels:
|
|
|
|
io.kompose.service: nextcloud-aio-database
|
|
|
|
name: nextcloud-aio-database
|
2024-02-29 02:30:56 +08:00
|
|
|
namespace: "{{ .Values.NAMESPACE }}"
|
2022-12-22 20:29:31 +08:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
io.kompose.service: nextcloud-aio-database
|
2024-03-08 17:34:27 +08:00
|
|
|
strategy:
|
|
|
|
type: Recreate
|
2022-12-22 20:29:31 +08:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
annotations:
|
2024-12-16 18:40:10 +08:00
|
|
|
kompose.version: 1.35.0 (9532ceef3)
|
2022-12-22 20:29:31 +08:00
|
|
|
labels:
|
|
|
|
io.kompose.service: nextcloud-aio-database
|
|
|
|
spec:
|
2024-11-15 23:52:55 +08:00
|
|
|
securityContext:
|
|
|
|
# The items below only work in pod context
|
|
|
|
fsGroup: 999
|
|
|
|
fsGroupChangePolicy: "OnRootMismatch"
|
|
|
|
# The items below work in both contexts
|
|
|
|
runAsUser: 999
|
|
|
|
runAsGroup: 999
|
|
|
|
runAsNonRoot: true
|
2024-11-26 18:14:52 +08:00
|
|
|
{{- if eq (.Values.RPSS_ENABLED | default "no") "yes" }}
|
2024-11-15 23:52:55 +08:00
|
|
|
seccompProfile:
|
|
|
|
type: RuntimeDefault
|
|
|
|
{{- end }}
|
2023-02-03 00:37:19 +08:00
|
|
|
initContainers:
|
2023-05-11 17:48:01 +08:00
|
|
|
- name: init-subpath
|
2024-11-08 17:17:30 +08:00
|
|
|
image: "alpine:3.20"
|
2023-05-11 17:48:01 +08:00
|
|
|
command:
|
|
|
|
- mkdir
|
|
|
|
- "-p"
|
|
|
|
- /nextcloud-aio-database/data
|
|
|
|
volumeMounts:
|
2023-02-01 23:00:52 +08:00
|
|
|
- name: nextcloud-aio-database
|
|
|
|
mountPath: /nextcloud-aio-database
|
2024-11-15 23:52:55 +08:00
|
|
|
securityContext:
|
|
|
|
# The items below only work in container context
|
|
|
|
allowPrivilegeEscalation: false
|
|
|
|
capabilities:
|
2024-11-26 18:14:52 +08:00
|
|
|
{{- if eq (.Values.RPSS_ENABLED | default "no") "yes" }}
|
2024-11-15 23:52:55 +08:00
|
|
|
drop: ["ALL"]
|
|
|
|
{{- else }}
|
|
|
|
drop: ["NET_RAW"]
|
|
|
|
{{- end }}
|
|
|
|
add: ["NET_BIND_SERVICE"]
|
2022-12-22 20:29:31 +08:00
|
|
|
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 }}"
|
2024-12-16 18:40:10 +08:00
|
|
|
image: nextcloud/aio-postgresql:20241216_102930
|
|
|
|
readinessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- /healthcheck.sh
|
|
|
|
failureThreshold: 3
|
|
|
|
periodSeconds: 30
|
|
|
|
timeoutSeconds: 30
|
|
|
|
livenessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- /healthcheck.sh
|
|
|
|
failureThreshold: 3
|
|
|
|
periodSeconds: 30
|
|
|
|
timeoutSeconds: 30
|
2022-12-22 20:29:31 +08:00
|
|
|
name: nextcloud-aio-database
|
2023-02-02 22:44:37 +08:00
|
|
|
ports:
|
|
|
|
- containerPort: 5432
|
2023-07-20 21:54:51 +08:00
|
|
|
protocol: TCP
|
2024-03-08 17:34:27 +08:00
|
|
|
securityContext:
|
2024-11-15 23:52:55 +08:00
|
|
|
# The items below only work in container context
|
2024-11-05 23:05:22 +08:00
|
|
|
allowPrivilegeEscalation: false
|
2024-03-08 17:34:27 +08:00
|
|
|
capabilities:
|
2024-11-26 18:14:52 +08:00
|
|
|
{{- if eq (.Values.RPSS_ENABLED | default "no") "yes" }}
|
2024-11-15 23:52:55 +08:00
|
|
|
drop: ["ALL"]
|
|
|
|
{{- else }}
|
|
|
|
drop: ["NET_RAW"]
|
|
|
|
{{- end }}
|
|
|
|
add: ["NET_BIND_SERVICE"]
|
2022-12-22 20:29:31 +08:00
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /var/lib/postgresql/data
|
2023-05-11 17:48:01 +08:00
|
|
|
subPath: data
|
2022-12-22 20:29:31 +08:00
|
|
|
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
|