nearly functional nextcloud
This commit is contained in:
		| @@ -30,6 +30,8 @@ persistence: | |||||||
|     storageClassName: "nfs-client" |     storageClassName: "nfs-client" | ||||||
|     # -- homarr-config access mode |     # -- homarr-config access mode | ||||||
|     accessMode: "ReadWriteOnce" |     accessMode: "ReadWriteOnce" | ||||||
|  |     persistentVolumeReclaimPolicy: Retain | ||||||
|  |  | ||||||
|     # -- homarr-config storage size |     # -- homarr-config storage size | ||||||
|     size: "50Mi" |     size: "50Mi" | ||||||
|     # -- homarr-config mount path inside the pod |     # -- homarr-config mount path inside the pod | ||||||
|   | |||||||
							
								
								
									
										5
									
								
								apps/nextcloud/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								apps/nextcloud/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  | ### Runninf `occ` commands: | ||||||
|  |  | ||||||
|  | ``` | ||||||
|  | su -s /bin/bash www-data -c "php occ user:list" | ||||||
|  | ``` | ||||||
| @@ -1,7 +1,6 @@ | |||||||
| apiVersion: traefik.containo.us/v1alpha1 | apiVersion: traefik.containo.us/v1alpha1 | ||||||
| kind: IngressRoute | kind: IngressRoute | ||||||
| metadata: | metadata: | ||||||
|   namespace: nextcloud |  | ||||||
|   name: nextcloud-ingressroute |   name: nextcloud-ingressroute | ||||||
|  |  | ||||||
| spec: | spec: | ||||||
|   | |||||||
							
								
								
									
										16
									
								
								apps/nextcloud/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								apps/nextcloud/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | resources:  | ||||||
|  | - namespace.yaml | ||||||
|  | - ingress.yaml | ||||||
|  | - pvc.yaml | ||||||
|  | - postgres.sealedsecret.yaml | ||||||
|  |  | ||||||
|  | namespace: nextcloud | ||||||
|  |  | ||||||
|  | helmCharts: | ||||||
|  |   - name: nextcloud | ||||||
|  |     releaseName: nextcloud | ||||||
|  |     version: 4.5.5 | ||||||
|  |     valuesFile: values.yaml | ||||||
|  |     repo: https://nextcloud.github.io/helm/ | ||||||
							
								
								
									
										4
									
								
								apps/nextcloud/namespace.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								apps/nextcloud/namespace.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: Namespace | ||||||
|  | metadata: | ||||||
|  |   name: placeholder | ||||||
							
								
								
									
										22
									
								
								apps/nextcloud/postgres.sealedsecret.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								apps/nextcloud/postgres.sealedsecret.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | |||||||
|  | { | ||||||
|  |   "kind": "SealedSecret", | ||||||
|  |   "apiVersion": "bitnami.com/v1alpha1", | ||||||
|  |   "metadata": { | ||||||
|  |     "name": "postgres-password", | ||||||
|  |     "namespace": "nextcloud-2", | ||||||
|  |     "creationTimestamp": null | ||||||
|  |   }, | ||||||
|  |   "spec": { | ||||||
|  |     "template": { | ||||||
|  |       "metadata": { | ||||||
|  |         "name": "postgres-password", | ||||||
|  |         "namespace": "nextcloud-2", | ||||||
|  |         "creationTimestamp": null | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "encryptedData": { | ||||||
|  |       "password": "AgCTf42UpSAuA7lePywunYCtI/v1rh63mQSLRX50Lp2VdnFLU1XxmdHjDj38lJN1TCWZPzDlp+YX4vMeGNJJuxFIvytgJnaZCAQthD04U8/4oXVJMaMi6NkWtL0qmNVplbSFxtkWEBEyMkpWg9zy5lXJyOSGnYpoq1wT+GO9gHDIww+T68M6ellxIUcv6NBDI9ErjoFJuKI+z+wrtsInLlT8Fu1J5srSpuZm0ZYqu0m1Z5NilKyrnva1pcsfR7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SVk+12bBwCqPf0ymjPXaXibnFoevV+3sm2oy1URPZTMvClAngy5wWzzS6GTRlaU0b6vg+AD82h5Q6id70HLaGJ+SWrqlB4rTZ8hHDHfsuaF739KWM7vr7g==" | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
| @@ -1,13 +1,10 @@ | |||||||
| apiVersion: v1 | apiVersion: v1 | ||||||
| kind: PersistentVolume | kind: PersistentVolume | ||||||
| metadata: | metadata: | ||||||
|   namespace: nextcloud |  | ||||||
|   name: nextcloud-nfs |   name: nextcloud-nfs | ||||||
| spec: | spec: | ||||||
|   # storageClassName: fast |  | ||||||
|   capacity: |   capacity: | ||||||
|     storage: "150Gi" |     storage: "150Gi" | ||||||
|   # volumeMode: Filesystem |  | ||||||
|   accessModes: |   accessModes: | ||||||
|     - ReadWriteOnce |     - ReadWriteOnce | ||||||
|   nfs: |   nfs: | ||||||
| @@ -17,7 +14,6 @@ spec: | |||||||
| apiVersion: v1 | apiVersion: v1 | ||||||
| kind: PersistentVolumeClaim | kind: PersistentVolumeClaim | ||||||
| metadata: | metadata: | ||||||
|   namespace: nextcloud |  | ||||||
|   name: nextcloud-nfs |   name: nextcloud-nfs | ||||||
| spec: | spec: | ||||||
|   storageClassName: "" |   storageClassName: "" | ||||||
|   | |||||||
| @@ -1,32 +1,13 @@ | |||||||
| ## Official nextcloud image version | ## Official nextcloud image version | ||||||
| ## ref: https://hub.docker.com/r/library/nextcloud/tags/ | ## ref: https://hub.docker.com/r/library/nextcloud/tags/ | ||||||
| ## |  | ||||||
| image: | image: | ||||||
|   repository: nextcloud |   tag: "27" | ||||||
|   tag: "27" # needs to be a string because of the template |  | ||||||
|   pullPolicy: IfNotPresent |  | ||||||
|  |  | ||||||
| nameOverride: "" |  | ||||||
| fullnameOverride: "" |  | ||||||
| podAnnotations: {} |  | ||||||
| deploymentAnnotations: {} |  | ||||||
|  |  | ||||||
| # Number of replicas to be deployed |  | ||||||
| replicaCount: 1 |  | ||||||
|  |  | ||||||
| ## Allowing use of ingress controllers |  | ||||||
| ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ |  | ||||||
| ## |  | ||||||
| ingress: | ingress: | ||||||
|   enabled: false |   enabled: false | ||||||
|  |  | ||||||
|  |  | ||||||
| # Allow configuration of lifecycle hooks |  | ||||||
| # ref: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/ |  | ||||||
| lifecycle: {} |  | ||||||
|   # postStartCommand: [] |  | ||||||
|   # preStopCommand: [] |  | ||||||
|  |  | ||||||
| nextcloud: | nextcloud: | ||||||
|   host: nextcloud.kluster.moll.re |   host: nextcloud.kluster.moll.re | ||||||
|   username: admin |   username: admin | ||||||
| @@ -87,48 +68,9 @@ nextcloud: | |||||||
|   #        ) |   #        ) | ||||||
|   #      ); |   #      ); | ||||||
|  |  | ||||||
|   ## Strategy used to replace old pods |  | ||||||
|   ## IMPORTANT: use with care, it is suggested to leave as that for upgrade purposes |  | ||||||
|   ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy |  | ||||||
|   strategy: |  | ||||||
|     type: Recreate |  | ||||||
|     # type: RollingUpdate |  | ||||||
|     # rollingUpdate: |  | ||||||
|     #   maxSurge: 1 |  | ||||||
|     #   maxUnavailable: 0 |  | ||||||
|  |  | ||||||
|   ## |  | ||||||
|   ## Extra environment variables |  | ||||||
|   extraEnv: |  | ||||||
|   #  - name: SOME_SECRET_ENV |  | ||||||
|   #    valueFrom: |  | ||||||
|   #      secretKeyRef: |  | ||||||
|   #        name: nextcloud |  | ||||||
|   #        key: secret_key |  | ||||||
|  |  | ||||||
|   # Extra mounts for the pods. Example shown is for connecting a legacy NFS volume |  | ||||||
|   # to NextCloud pods in Kubernetes. This can then be configured in External Storage |  | ||||||
|   extraVolumes: |  | ||||||
|   #  - name: nfs |  | ||||||
|   #    nfs: |  | ||||||
|   #      server: "10.0.0.1" |  | ||||||
|   #      path: "/nextcloud_data" |  | ||||||
|   #      readOnly: false |  | ||||||
|   extraVolumeMounts: |  | ||||||
|   #  - name: nfs |  | ||||||
|   #    mountPath: "/legacy_data" |  | ||||||
|  |  | ||||||
|   # Extra secuurityContext parameters. For example you may need to define runAsNonRoot directive |  | ||||||
|   # extraSecurityContext: |  | ||||||
|   #   runAsUser: "33" |  | ||||||
|   #   runAsGroup: "33" |  | ||||||
|   #   runAsNonRoot: true |  | ||||||
|   #   readOnlyRootFilesystem: true |  | ||||||
|  |  | ||||||
| nginx: | nginx: | ||||||
|   ## You need to set an fpm version of the image for nextcloud if you want to use nginx! |   ## You need to set an fpm version of the image for nextcloud if you want to use nginx! | ||||||
|   enabled: false |   enabled: false | ||||||
|   resources: {} |  | ||||||
|  |  | ||||||
| internalDatabase: | internalDatabase: | ||||||
|   enabled: true |   enabled: true | ||||||
| @@ -147,52 +89,38 @@ externalDatabase: | |||||||
|   host: postgres-postgresql.postgres |   host: postgres-postgresql.postgres | ||||||
|  |  | ||||||
|   ## Database user |   ## Database user | ||||||
|   user: nextcloud |   # user: nextcloud | ||||||
|  |  | ||||||
|   ## Database password |   # ## Database password | ||||||
|   password: test |   # password: test | ||||||
|  |  | ||||||
|   ## Database name |   ## Database name | ||||||
|   database: nextcloud |   database: nextcloud | ||||||
|  |  | ||||||
|   ## Use a existing secret |   ## Use a existing secret | ||||||
|   existingSecret: |   existingSecret: | ||||||
|     enabled: false |     enabled: true | ||||||
|     # secretName: nameofsecret |     secretName: postgres-password | ||||||
|     # usernameKey: username |     usernameKey: username | ||||||
|     # passwordKey: password |     passwordKey: password | ||||||
|  |  | ||||||
| ## | ## | ||||||
| ## MariaDB chart configuration | ## MariaDB chart configuration | ||||||
| ## | ## | ||||||
| mariadb: | mariadb: | ||||||
|   ## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters |  | ||||||
|   enabled: false |   enabled: false | ||||||
|  |  | ||||||
| postgresql: | postgresql: | ||||||
|   enabled: false |   enabled: false | ||||||
| ## |  | ||||||
| ## Redis chart configuration |  | ||||||
| ## for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis |  | ||||||
| ## |  | ||||||
|  |  | ||||||
| redis: | redis: | ||||||
|   enabled: false |   enabled: false | ||||||
|   auth: |  | ||||||
|     enabled: true |  | ||||||
|     password: 'changeme' |  | ||||||
|  |  | ||||||
| ## Cronjob to execute Nextcloud background tasks | ## Cronjob to execute Nextcloud background tasks | ||||||
| ## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#webcron | ## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#webcron | ||||||
| ## | ## | ||||||
| cronjob: | cronjob: | ||||||
|   enabled: false |   enabled: false | ||||||
|   # Nexcl |  | ||||||
| service: |  | ||||||
|   type: ClusterIP |  | ||||||
|   port: 8080 |  | ||||||
|   loadBalancerIP: nil |  | ||||||
|   nodePort: nil |  | ||||||
|  |  | ||||||
| ## Enable persistence using Persistent Volume Claims | ## Enable persistence using Persistent Volume Claims | ||||||
| ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ | ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ | ||||||
| @@ -201,33 +129,14 @@ persistence: | |||||||
|   # Nextcloud Data (/var/www/html) |   # Nextcloud Data (/var/www/html) | ||||||
|   enabled: true |   enabled: true | ||||||
|   annotations: {} |   annotations: {} | ||||||
|   ## nextcloud data Persistent Volume Storage Class |  | ||||||
|   ## If defined, storageClassName: <storageClass> |  | ||||||
|   ## If set to "-", storageClassName: "", which disables dynamic provisioning |  | ||||||
|   ## If undefined (the default) or set to null, no storageClassName spec is |  | ||||||
|   ##   set, choosing the default provisioner.  (gp2 on AWS, standard on |  | ||||||
|   ##   GKE, AWS & OpenStack) |  | ||||||
|   ## |  | ||||||
|   # storageClass: "-" |  | ||||||
|  |  | ||||||
|   ## A manually managed Persistent Volume and Claim |  | ||||||
|   ## Requires persistence.enabled: true |  | ||||||
|   ## If defined, PVC must be created manually before volume will be bound |   ## If defined, PVC must be created manually before volume will be bound | ||||||
|   existingClaim: nextcloud-nfs |   existingClaim: nextcloud-nfs | ||||||
|  |  | ||||||
|   accessMode: ReadWriteOnce |  | ||||||
|   size: 150Gi |  | ||||||
|  |  | ||||||
|   ## Use an additional pvc for the data directory rather than a subpath of the default PVC |   ## Use an additional pvc for the data directory rather than a subpath of the default PVC | ||||||
|   ## Useful to store data on a different storageClass (e.g. on slower disks) |   ## Useful to store data on a different storageClass (e.g. on slower disks) | ||||||
|   nextcloudData: |   nextcloudData: | ||||||
|     enabled: false |     enabled: false | ||||||
|     subPath: |  | ||||||
|     annotations: {} |  | ||||||
|     # storageClass: "-" |  | ||||||
|     # existingClaim: |  | ||||||
|     accessMode: ReadWriteOnce |  | ||||||
|     size: 8Gi |  | ||||||
|  |  | ||||||
| resources: | resources: | ||||||
|   # We usually recommend not to specify default resources and to leave this as a conscious |   # We usually recommend not to specify default resources and to leave this as a conscious | ||||||
| @@ -241,31 +150,6 @@ resources: | |||||||
|    cpu: 100m |    cpu: 100m | ||||||
|    memory: 128Mi |    memory: 128Mi | ||||||
|  |  | ||||||
| ## Liveness and readiness probe values |  | ||||||
| ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes |  | ||||||
| ## |  | ||||||
| livenessProbe: |  | ||||||
|   enabled: true |  | ||||||
|   initialDelaySeconds: 250 |  | ||||||
|   periodSeconds: 10 |  | ||||||
|   timeoutSeconds: 5 |  | ||||||
|   failureThreshold: 3 |  | ||||||
|   successThreshold: 1 |  | ||||||
| readinessProbe: |  | ||||||
|   enabled: true |  | ||||||
|   initialDelaySeconds: 250 |  | ||||||
|   periodSeconds: 10 |  | ||||||
|   timeoutSeconds: 5 |  | ||||||
|   failureThreshold: 3 |  | ||||||
|   successThreshold: 1 |  | ||||||
| startupProbe: |  | ||||||
|   enabled: false |  | ||||||
|   initialDelaySeconds: 250 |  | ||||||
|   periodSeconds: 10 |  | ||||||
|   timeoutSeconds: 5 |  | ||||||
|   failureThreshold: 30 |  | ||||||
|   successThreshold: 1 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| ## Enable pod autoscaling using HorizontalPodAutoscaler | ## Enable pod autoscaling using HorizontalPodAutoscaler | ||||||
| ## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ | ## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ | ||||||
| @@ -273,13 +157,6 @@ startupProbe: | |||||||
| hpa: | hpa: | ||||||
|   enabled: false |   enabled: false | ||||||
|  |  | ||||||
| nodeSelector: {} |  | ||||||
|  |  | ||||||
| tolerations: [] |  | ||||||
|  |  | ||||||
| affinity: {} |  | ||||||
|  |  | ||||||
|  |  | ||||||
| ## Prometheus Exporter / Metrics | ## Prometheus Exporter / Metrics | ||||||
| ## | ## | ||||||
| metrics: | metrics: | ||||||
| @@ -288,7 +165,3 @@ metrics: | |||||||
|  |  | ||||||
| rbac: | rbac: | ||||||
|   enabled: false |   enabled: false | ||||||
|   serviceaccount: |  | ||||||
|     create: true |  | ||||||
|     name: nextcloud-serviceaccount |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -3,10 +3,10 @@ apiVersion: v1 | |||||||
| metadata: | metadata: | ||||||
|   name: rss-claim |   name: rss-claim | ||||||
| spec: | spec: | ||||||
|  |   persistentVolumeReclaimPolicy: Retain | ||||||
|   storageClassName: nfs-client |   storageClassName: nfs-client | ||||||
|   accessModes: |   accessModes: | ||||||
|     - ReadWriteOnce |     - ReadWriteOnce | ||||||
|   resources: |   resources: | ||||||
|     requests: |     requests: | ||||||
|       storage: 1Gi |       storage: 1Gi | ||||||
|  |  | ||||||
|   | |||||||
| @@ -27,3 +27,4 @@ resources: | |||||||
|   - rss/ |   - rss/ | ||||||
|   - adguard/ |   - adguard/ | ||||||
|   - media/ |   - media/ | ||||||
|  |   - nextcloud/ | ||||||
|   | |||||||
							
								
								
									
										18
									
								
								kluster-deployments/nextcloud/application.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								kluster-deployments/nextcloud/application.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | apiVersion: argoproj.io/v1alpha1 | ||||||
|  | kind: Application | ||||||
|  | metadata: | ||||||
|  |   name: nextcloud-application | ||||||
|  |   namespace: argocd | ||||||
|  | spec: | ||||||
|  |   project: apps | ||||||
|  |   source: | ||||||
|  |     repoURL: ssh://git@git.kluster.moll.re:2222/remoll/k3s-infra.git | ||||||
|  |     targetRevision: main | ||||||
|  |     path: apps/nextcloud/ | ||||||
|  |   destination: | ||||||
|  |     server: https://kubernetes.default.svc | ||||||
|  |     namespace: nextcloud | ||||||
|  |   syncPolicy: | ||||||
|  |     automated: | ||||||
|  |       prune: true | ||||||
|  |       selfHeal: true | ||||||
							
								
								
									
										4
									
								
								kluster-deployments/nextcloud/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								kluster-deployments/nextcloud/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | resources: | ||||||
|  |   - application.yaml | ||||||
		Reference in New Issue
	
	Block a user