From fa6fe1c49970c55172a9b7d6105042a6b04f6ca1 Mon Sep 17 00:00:00 2001 From: Moritz Graf Date: Tue, 19 Apr 2022 07:10:45 +0200 Subject: [PATCH] Adding nextcloud stuff & migration to latest version --- k8s/README.md | 19 +++++++++++++++++-- k8s/nextcloud/nextcloud-phpmyadmin.yml | 17 +++++++++++------ k8s/nextcloud/nextcloud.secret.yml | 23 ++++++++++++++++------- 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/k8s/README.md b/k8s/README.md index 5e6f629..4f8c348 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -248,7 +248,8 @@ Includes *persistent data* from mariadb table `tt-rss`. ```sh helm upgrade --install tt-rss-mariadb bitnami/mariadb -n tt-rss -f tt-rss/tt-rss-mariadb.secret.yml helm upgrade --install tt-rss-phpmyadmin bitnami/phpmyadmin -n tt-rss -f tt-rss/tt-rss-phpmyadmin.yml -kubectl apply -f tt-rss/ + +helm upgrade --install tt-rss k8s-at-home/tt-rss -n tt-rss -f tt-rss/tt-rss.helm.secret.yml ``` ## monitoring @@ -349,10 +350,24 @@ kubectl apply $(ls octobot-fabi/*.yaml | awk ' { print " -f " $1 } ') ```sh helm repo add nextcloud https://nextcloud.github.io/helm/ helm repo update -helm upgrade --install nextcloud nextcloud/nextcloud -n nextcloud --version 2.0.2 -f nextcloud/nextcloud.secret.yml +helm upgrade --install nextcloud nextcloud/nextcloud -n nextcloud --version 2.14.1 -f nextcloud/nextcloud.secret.yml helm upgrade --install nextcloud-phpmyadmin bitnami/phpmyadmin -n nextcloud -f nextcloud/nextcloud-phpmyadmin.yml ``` +Execute occ in container: + +```sh +runuser --user www-data -- /usr/local/bin/php /var/www/html/occ +``` + +Delete stuff for upgrade (sometime necessary): + +```sh +kubectl delete sts/nextcloud-mariadb -n nextcloud +kubectl delete sts/nextcloud-redis-master -n nextcloud +kubectl delete deployment nextcloud -n nextcloud +``` + ### backup & restore #TODO with Velero diff --git a/k8s/nextcloud/nextcloud-phpmyadmin.yml b/k8s/nextcloud/nextcloud-phpmyadmin.yml index 14faddb..a132959 100644 --- a/k8s/nextcloud/nextcloud-phpmyadmin.yml +++ b/k8s/nextcloud/nextcloud-phpmyadmin.yml @@ -3,11 +3,16 @@ db: host: nextcloud-mariadb ingress: enabled: true - hosts: - - path: "/" - tls: true - name: "nextcloud.phpmyadmin.haumdaucher.de" - tlsSecret: "nextcloud-phpmyadmin-haumdaucher-de" + hostname: "nextcloud.phpmyadmin.haumdaucher.de" + tls: "true" + ingressClassName: "nginx" + # hosts: + # - path: "/" + # tls: true + # name: "nextcloud.phpmyadmin.haumdaucher.de" + # tlsSecret: "nextcloud-phpmyadmin-haumdaucher-de" annotations: cert-manager.io/cluster-issuer: "letsencrypt-prod" - nginx.ingress.kubernetes.io/proxy-body-size: "0" \ No newline at end of file + nginx.ingress.kubernetes.io/proxy-body-size: "0" + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" \ No newline at end of file diff --git a/k8s/nextcloud/nextcloud.secret.yml b/k8s/nextcloud/nextcloud.secret.yml index 78f6563..8ef6f06 100644 --- a/k8s/nextcloud/nextcloud.secret.yml +++ b/k8s/nextcloud/nextcloud.secret.yml @@ -17,20 +17,29 @@ cronjob: enabled: true internalDatabase: enabled: false -# externalDatabase: -# host: nextcloud-mariadb -# user: nextcloud -# password: Uth3aecheiDouzohx4uajauyi +externalDatabase: + host: nextcloud-mariadb + user: nextcloud + password: Uth3aecheiDouzohx4uajauyi mariadb: enabled: true replication: enabled: false - db: + # db: + # name: nextcloud + # user: nextcloud + # password: Uth3aecheiDouzohx4uajauyi + # rootUser: + # password: aeriukuow8shaiHoh4aimie5u + auth: + rootPassword: aeriukuow8shaiHoh4aimie5u name: nextcloud user: nextcloud password: Uth3aecheiDouzohx4uajauyi - rootUser: - password: aeriukuow8shaiHoh4aimie5u + primary: + persistence: + enabled: true + existingClaim: data-nextcloud-mariadb-0 redis: enabled: true cluster: