- Prefix all object names with `{{ .Release.Name }}-` as per AGENTS.md guidelines
- Rename persistent volume claims to follow `data-$CHART_NAME` pattern
- Update backup configuration to use generic secret and backup names
- Add troubleshooting section for config.php updates in README
- Improve domain configuration in ConfigMap to support custom domains
- Parameterize storage size in values.yaml with default set to 40Gi
- Disable collabora by default and adjust related configurations
- Align postgres deployment with new naming conventions
- Remove outdated job template for occ commands
- Update documentation examples with dynamic password generation
83 lines
2.6 KiB
YAML
83 lines
2.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Release.Name }}-nextcloud
|
|
labels:
|
|
app: nextcloud
|
|
annotations:
|
|
"helm.sh/hook": pre-install,pre-upgrade
|
|
"helm.sh/hook-weight": "-5"
|
|
"helm.sh/hook-delete-policy": before-hook-creation
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: nextcloud
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nextcloud
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/cm.yaml") . | sha256sum }}
|
|
spec:
|
|
initContainers:
|
|
- name: wait-for-db
|
|
image: busybox:1.35
|
|
command: ['sh', '-c', 'until nc -z {{ .Release.Name }}-postgresql-rw.{{ .Release.Namespace }}.svc.cluster.local 5432; do echo waiting for postgresql; sleep 2; done']
|
|
containers:
|
|
- name: nextcloud
|
|
image: {{ .Values.image }}
|
|
imagePullPolicy: {{ .Values.imagePullPolicy }}
|
|
ports:
|
|
- containerPort: 80
|
|
envFrom:
|
|
- configMapRef:
|
|
name: {{ .Release.Name }}-configmap
|
|
env:
|
|
- name: NEXTCLOUD_ADMIN_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: nextcloud-creds
|
|
key: NEXTCLOUD_ADMIN_USER
|
|
- name: NEXTCLOUD_ADMIN_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: nextcloud-creds
|
|
key: NEXTCLOUD_ADMIN_PASSWORD
|
|
{{- if .Values.cnpg.enabled }}
|
|
- name: POSTGRES_DB
|
|
value: {{ .Values.cnpg.database }}
|
|
- name: POSTGRES_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-postgresql-app
|
|
key: username
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-postgresql-app
|
|
key: password
|
|
- name: POSTGRES_HOST
|
|
value: {{ .Release.Name }}-postgresql-rw.{{ .Release.Namespace }}.svc.cluster.local
|
|
{{- end }}
|
|
- name: NEXTCLOUD_DATA_DIR
|
|
value: "/var/www/html/data"
|
|
volumeMounts:
|
|
- name: nextcloud
|
|
mountPath: /var/www/html
|
|
# livenessProbe:
|
|
# httpGet:
|
|
# path: /status.php
|
|
# port: 80
|
|
# initialDelaySeconds: 120
|
|
# periodSeconds: 10
|
|
# readinessProbe:
|
|
# httpGet:
|
|
# path: /status.php
|
|
# port: 80
|
|
# initialDelaySeconds: 30
|
|
# periodSeconds: 5
|
|
volumes:
|
|
- name: nextcloud
|
|
persistentVolumeClaim:
|
|
claimName: data-nextcloud
|