171 lines
3.6 KiB
YAML
171 lines
3.6 KiB
YAML
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||
|
kind: Kustomization
|
||
|
namespace: nextcloud-dev
|
||
|
|
||
|
# ressources utilisées, appel de base et ajout de namespace.yaml
|
||
|
resources:
|
||
|
- ../../base/
|
||
|
- resources/namespace.yaml
|
||
|
|
||
|
#- resources/host-config.yaml
|
||
|
|
||
|
# deux façon de faire la seconde ici =>
|
||
|
# - patches/nextcloud-patch.yaml
|
||
|
|
||
|
patchesStrategicMerge:
|
||
|
- patches/redis-config.yaml
|
||
|
- patches/ConfigMaps.yaml
|
||
|
- patches/ConfigMap-ldap-script.yaml
|
||
|
- patches/job.yaml
|
||
|
|
||
|
patchesJson6902:
|
||
|
- target:
|
||
|
group: apps
|
||
|
version: v1
|
||
|
kind: Deployment
|
||
|
name: app
|
||
|
path: patches/nextcloud-variables.yaml
|
||
|
- target:
|
||
|
group: apps
|
||
|
version: v1
|
||
|
kind: Deployment
|
||
|
name: app
|
||
|
path: patches/nextcloud-postgres.yaml
|
||
|
|
||
|
### S3 patch do not work !
|
||
|
# W not ok, R not ok
|
||
|
#- target:
|
||
|
# group: apps
|
||
|
# version: v1
|
||
|
# kind: Deployment
|
||
|
# name: app
|
||
|
# path: patches/nextcloud-S3.yaml
|
||
|
- target:
|
||
|
group: apps
|
||
|
version: v1
|
||
|
kind: Deployment
|
||
|
name: app
|
||
|
path: patches/nextcloud-probe.yaml
|
||
|
- target:
|
||
|
group: apps
|
||
|
version: v1
|
||
|
kind: Deployment
|
||
|
name: app
|
||
|
path: patches/nextcloud-smtp.yaml
|
||
|
- target:
|
||
|
group: apps
|
||
|
version: v1
|
||
|
kind: Ingress
|
||
|
name: nextcloud
|
||
|
path: patches/ingress-nextcloud.yaml
|
||
|
- target:
|
||
|
group: apps
|
||
|
version: v2
|
||
|
kind: Tenant
|
||
|
name: nextcloud-minio
|
||
|
path: patches/tenant-conf.yaml
|
||
|
- target:
|
||
|
group: apps
|
||
|
version: v1
|
||
|
kind: Deployment
|
||
|
name: app
|
||
|
path: patches/nextcloud-ldap.yaml
|
||
|
|
||
|
# PARTIE MINIO
|
||
|
|
||
|
# secret re-généré
|
||
|
#secretGenerator:
|
||
|
#- name: db-user-pass
|
||
|
# envs:
|
||
|
# - ./resources/files/minio/config.env
|
||
|
secretGenerator:
|
||
|
#Voir https://github.com/minio/operator/issues/856
|
||
|
- name: nextcloud-minio-user
|
||
|
behavior: replace
|
||
|
literals:
|
||
|
- CONSOLE_ACCESS_KEY=minio_root
|
||
|
- CONSOLE_SECRET_KEY=MinioRootNotSoSecret
|
||
|
- name: nextcloud-minio-configuration
|
||
|
behavior: replace
|
||
|
files:
|
||
|
- ./resources/files/minio/config.env # A modifier si modification mot de passe et user CONSOLE [ACCESS-SECRET]
|
||
|
|
||
|
|
||
|
# ajout de Variable, et redéfinition de certaines
|
||
|
configMapGenerator:
|
||
|
#- name: nextcloud-parameters
|
||
|
# files:
|
||
|
# - ./resources/files/parameters.yaml
|
||
|
- name: nextcloud-env
|
||
|
behavior: replace
|
||
|
literals:
|
||
|
- MINIO_SERVICE_NAME=$(MINIO_SERVICE_HOST):$(MINIO_SERVICE_PORT)
|
||
|
- MINIO_SERVICE_HOST=minio
|
||
|
- MINIO_SERVICE_PORT=443
|
||
|
options:
|
||
|
disableNameSuffixHash: true
|
||
|
- name: nextcloud-smtp
|
||
|
literals:
|
||
|
- smtp-username=user
|
||
|
- smtp-password=password
|
||
|
options:
|
||
|
disableNameSuffixHash: true
|
||
|
|
||
|
# PARTIE MAUVAISE IDEE
|
||
|
|
||
|
#replacements:
|
||
|
# - source:
|
||
|
# kind: ConfigMap
|
||
|
# name: host-config
|
||
|
# fieldPath: data.NEXTCLOUD_HOST
|
||
|
# targets:
|
||
|
# - select:
|
||
|
# kind: Ingress
|
||
|
# name: nextcloud
|
||
|
# fieldPaths:
|
||
|
# - /spec/rules[0]/host
|
||
|
# - select:
|
||
|
# kind: Deployment
|
||
|
# name: app
|
||
|
# fieldPaths:
|
||
|
# - /spec/template/spec/containers[0]/readinessProbe/httpGet/httpHeaders[0].value
|
||
|
# - /spec/template/spec/containers[0]/livenessProbe/httpGet/httpHeaders[0].value
|
||
|
|
||
|
#vars:
|
||
|
# - name: NEXTCLOUD_HOST
|
||
|
# objref:
|
||
|
# kind: ConfigMap
|
||
|
# name: host-config
|
||
|
# apiVersion: v1
|
||
|
# fieldref:
|
||
|
# fieldpath: data.NEXTCLOUD_HOST
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
## faire un fichier patch.yaml et ajouter les données à modifier comme dans les patch mse
|
||
|
#
|
||
|
# patchesStrategicMerge => deprecated use patches instead
|
||
|
# patchesJson6902: => deprecated use patches instead
|
||
|
# vars => deprecated use replacements instead
|
||
|
|
||
|
# PRINCIPE DU PATCHE
|
||
|
#- target:
|
||
|
# version: v1
|
||
|
# kind: Deployment # ce type de kind .. qui signifie ni plus ni moins ce type de type -_-
|
||
|
# name: app
|
||
|
# path: patches/le patch.yaml
|
||
|
|
||
|
# modif pour l'image ?
|
||
|
#images:
|
||
|
#- name: foo/bar
|
||
|
# newName: foo/bar
|
||
|
# newTag: 3.4.5
|