1
0
Fork 0
home-stack-kustomize/kustomize/bases/nextcloud/kustomization.yaml

68 lines
1.6 KiB
YAML

resources:
- ../postgres
- ../redis
- nextcloud-deployment.yaml
- collabora-deployment.yaml
- nextcloud-cronjob.yaml
# - previewgenerator-cronjob.yaml
- nextcloud-ingress.yaml
namePrefix: nextcloud-
commonLabels:
app.kubernetes.io/name: nextcloud
configMapGenerator:
- name: server-config
files:
- php-user.ini=configurations/php-user.ini
- apache-user.cfg=configurations/apache-user.conf
- name: kustomize-generated-config
literals:
- NEXTCLOUD_EXTERNAL_HOST=cloud.badjware.dev
replacements:
- source:
kind: ConfigMap
name: kustomize-generated-config
fieldPath: data.NEXTCLOUD_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: server
fieldPaths:
- spec.rules.0.host
- select:
kind: Deployment
name: collabora
fieldPaths:
- spec.template.spec.containers.0.env.0.value
patches:
- patch: |-
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: postgres-credentials
spec:
data:
- secretKey: database
remoteRef:
key: /k3s/prod/nextcloud/postgres/database
- secretKey: username
remoteRef:
key: /k3s/prod/nextcloud/postgres/username
- secretKey: password
remoteRef:
key: /k3s/prod/nextcloud/postgres/password
- patch: |-
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: redis-credentials
spec:
data:
- secretKey: password
remoteRef:
key: /k3s/prod/nextcloud/redis/password