feat(all): global cleanning adding dev overlay
This commit is contained in:
46
overlays/dev/resources/nextcloud/cm-ldap-script.yaml
Normal file
46
overlays/dev/resources/nextcloud/cm-ldap-script.yaml
Normal file
@ -0,0 +1,46 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: script-config-ldap
|
||||
data:
|
||||
poststart-ldap.sh: |
|
||||
#!/bin/sh
|
||||
|
||||
/bin/sh -c "/var/www/html/occ app:install user_ldap"
|
||||
/bin/sh -c "/var/www/html/occ app:update user_ldap"
|
||||
/bin/sh -c "/var/www/html/occ app:enable user_ldap"
|
||||
|
||||
/bin/sh -c "/var/www/html/occ ldap:show-config s01 > /tmp/nxt-ldap.txt"
|
||||
if grep -q "Invalid configID" /tmp/nxt-ldap.txt; then
|
||||
/bin/sh -c "/var/www/html/occ ldap:create-empty-config"
|
||||
fi
|
||||
|
||||
# Configurez LDAP (configuration minimale)
|
||||
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldap_host '${NEXTCLOUD_LDAP_HOST}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldap_base '${NEXTCLOUD_LDAP_BASE}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldap_dn '${NEXTCLOUD_LDAP_DN}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldap_agent_password '${NEXTCLOUD_LDAP_PASSWD}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapBaseGroups '${NEXTCLOUD_LDAP_BASE_GROUPS}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapBaseUsers '${NEXTCLOUD_LDAP_BASE_USERS}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapConfigurationActive '${NEXTCLOUD_LDAP_ACTIVE_CONF}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapExperiencedAdmin '${NEXTCLOUD_LDAP_ADMIN_EXP}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapExpertUUIDUserAttr '${NEXTCLOUD_LDAP_EXP_UUID}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapLoginFilter '${NEXTCLOUD_LDAP_LOGIN_FILTER}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapLoginFilterAttributes '${NEXTCLOUD_LDAP_LOGIN_FILTER_ATTR}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapPort '${NEXTCLOUD_LDAP_PORT}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapUserFilter '${NEXTCLOUD_LDAP_USR_FILTR}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapUserFilterObjectclass '${NEXTCLOUD_LDAP_OBJ_FILTR}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapEmailAttribute '${NEXTCLOUD_LDAP_MAIL_ATTR}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapUserDisplayName '${NEXTCLOUD_LDAP_USER_DISP}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapGroupFilter '${NEXTCLOUD_LDAP_GROUP_FILTR}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapGroupFilterObjectclass '${NEXTCLOUD_LDAP_GROUP_FILTR_OBJCLASS}'"
|
||||
/bin/sh -c "/var/www/html/occ ldap:set-config s01 ldapGroupMemberAssocAttr '${NEXTCLOUD_LDAP_GROUP_MEMBR_ASSO}'"
|
||||
|
||||
# Lancez le processus principal de Nextcloud normalement ça ne marche pas ça ! donc plutot poststart.
|
||||
#exec /entrypoint.sh "$@"
|
||||
|
||||
# /bin/sh -c "/var/www/html/occ app:enable user_ldap"
|
||||
# est fonctionnel dans le pods nextcloud !
|
||||
|
||||
#liste config : /bin/sh -c "/var/www/html/occ config:list"
|
6
overlays/dev/resources/nextcloud/host-config.yaml
Normal file
6
overlays/dev/resources/nextcloud/host-config.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: host-config
|
||||
data:
|
||||
NEXTCLOUD_HOST: nxt.serveur.fr
|
41
overlays/dev/resources/nextcloud/job-minio.yaml
Normal file
41
overlays/dev/resources/nextcloud/job-minio.yaml
Normal file
@ -0,0 +1,41 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: create-minio-bucket
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
initContainers:
|
||||
- name: wait-for-minio
|
||||
image: reg.cadoles.com/proxy_cache/groundnuty/k8s-wait-for:v1.3
|
||||
args:
|
||||
- service
|
||||
- minio
|
||||
containers:
|
||||
- name: create-bucket
|
||||
image: minio/mc
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: nextcloud-env
|
||||
env:
|
||||
- name: CONSOLE_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: nextcloud-minio-user
|
||||
key: CONSOLE_ACCESS_KEY
|
||||
- name: CONSOLE_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: nextcloud-minio-user
|
||||
key: CONSOLE_SECRET_KEY
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
echo "création de l'alias my-minio"
|
||||
mc alias set --insecure my-minio https://${MINIO_SERVICE_HOST}:${MINIO_SERVICE_PORT} ${CONSOLE_ACCESS_KEY} ${CONSOLE_SECRET_KEY}
|
||||
echo "création du bucket..."
|
||||
mc mb --insecure my-minio/nextcloud-minio
|
||||
echo "Bucket créé. normalement"
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: nextcloud-sa # declare user for initcontainer
|
||||
|
29
overlays/dev/resources/nextcloud/minio-tenant.yaml
Normal file
29
overlays/dev/resources/nextcloud/minio-tenant.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
apiVersion: minio.min.io/v2
|
||||
kind: Tenant
|
||||
metadata:
|
||||
name: nextcloud-minio
|
||||
spec:
|
||||
certConfig:
|
||||
dnsNames:
|
||||
- "minio"
|
||||
pools:
|
||||
- servers: 2
|
||||
name: pool-0
|
||||
volumesPerServer: 3
|
||||
volumeClaimTemplate:
|
||||
metadata:
|
||||
name: nextcloud-minio-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 3Gi
|
||||
containerSecurityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
runAsNonRoot: true
|
||||
configuration:
|
||||
name: nextcloud-minio-configuration
|
||||
users:
|
||||
- name: nextcloud-minio-user
|
4
overlays/dev/resources/nextcloud/namespace.yaml
Normal file
4
overlays/dev/resources/nextcloud/namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: nextcloud-dev
|
40
overlays/dev/resources/nextcloud/ssl.yaml
Normal file
40
overlays/dev/resources/nextcloud/ssl.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: nextcloud
|
||||
spec:
|
||||
# Secret names are always required.
|
||||
#secretName: nextcloud-tls
|
||||
secretName: cadoles-selfsigned-ca
|
||||
|
||||
|
||||
duration: 2160h # 90d
|
||||
renewBefore: 360h # 15d
|
||||
subject:
|
||||
organizations:
|
||||
- cadoles
|
||||
# The use of the common name field has been deprecated since 2000 and is
|
||||
# discouraged from being used.
|
||||
commonName: cadoles.lan
|
||||
isCA: false
|
||||
privateKey:
|
||||
algorithm: RSA
|
||||
encoding: PKCS1
|
||||
size: 2048
|
||||
usages:
|
||||
- server auth
|
||||
- client auth
|
||||
# At least one of a DNS Name, URI, or IP address is required.
|
||||
dnsNames:
|
||||
- nextcloud
|
||||
- nextcloud.cadoles.lan
|
||||
- nxt.cadoles.lan
|
||||
# Issuer references are always required.
|
||||
issuerRef:
|
||||
name: cadoles-ca-issuer
|
||||
# We can reference ClusterIssuers by changing the kind here.
|
||||
# The default value is Issuer (i.e. a locally namespaced Issuer)
|
||||
kind: Issuer
|
||||
# This is optional since cert-manager will default to this value however
|
||||
# if you are using an external issuer, change this to that issuer group.
|
||||
group: cert-manager.io
|
Reference in New Issue
Block a user