Skip to content

Commit

Permalink
nextcloud migration (#2377)
Browse files Browse the repository at this point in the history
* init commit

* add deployments

* more config

* syntax err

* syntax err

* add missing func

* naming

* lint

* fix yaml

* yaml

* ci vals

* ci port

* perms

* wrong pod

* hmm

* meh

* no nginx without cert

* db stuf

* simplify

* add nots

* fixes

* add todo

* storage

* test https

* perms

* actually mount the config

* add some configs

* update values

* fsgroup

* cmaps

* update config

* init quests

* more test vals

* more questions

* nginx conf

* cron

* fix cron

* meta

* typo

* additional storage goes to cron too

* data and html

* config

* ui

* values

* fix

* add backwards compat

* make templ

* use var

* init migration

* make exec

* add todo

* handle hostpaths too

* update storage for backwards

* typo

* add redis

* cleaner storage solution

* br

* rm

* some cleanup

* backup

* whops

* fsgroup

* fix db script

* bump image

* remove test

* test

* todo

* try this

* lets try a hack

* hmm

* nope

* eof

* ofc

* hmm

* fix

* explain the hack

* update vers

* remove todo

* fix html storage

* backwards compat
  • Loading branch information
stavros-k authored May 2, 2024
1 parent 1ed36c1 commit fbc87af
Show file tree
Hide file tree
Showing 44 changed files with 1,896 additions and 1,250 deletions.
8 changes: 4 additions & 4 deletions library/ix-dev/charts/nextcloud/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../../../common/2304.0.1
version: 2304.0.1
digest: sha256:1ed155c6760e1166e2cb75b52bc5e81c6bdf0252c16ff5ede001157077c41670
generated: "2023-04-24T13:40:41.468936547+03:00"
repository: file://../../../common
version: 1.2.9
digest: sha256:af1a9a1f87e3e48453c9f25f909f5ebcd7fa6e25162b7b425448ba752bcdbc5c
generated: "2024-04-12T15:56:46.904719299+03:00"
6 changes: 3 additions & 3 deletions library/ix-dev/charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A file sharing server that puts the control and security of your ow
annotations:
title: Nextcloud
type: application
version: 1.6.61
version: 2.0.0
apiVersion: v2
appVersion: 29.0.0
kubeVersion: '>=1.16.0-0'
Expand All @@ -14,8 +14,8 @@ maintainers:
email: dev@ixsystems.com
dependencies:
- name: common
repository: file://../../../common/2304.0.1
version: 2304.0.1
repository: file://../../../common
version: 1.2.9
home: https://nextcloud.com/
icon: https://media.sys.truenas.net/apps/nextcloud/icons/icon.svg
sources:
Expand Down
12 changes: 2 additions & 10 deletions library/ix-dev/charts/nextcloud/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# nextcloud
# Nextcloud

[nextcloud](https://nextcloud.com/) is a file sharing server that puts the control and security of your own data back into your hands.

## Introduction

This chart bootstraps an [nextcloud](https://hub.docker.com/_/nextcloud/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Configuration

Please refer to questions.yaml for a detailed overview on supported configurable values.
[Nextcloud](https://nextcloud.com/) is a file sharing server that puts the control and security of your own data back into your hands.
4 changes: 2 additions & 2 deletions library/ix-dev/charts/nextcloud/app-readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# nextcloud
# Nextcloud

[nextcloud](https://nextcloud.com/) is a file sharing server that puts the control and security of your own data back into your hands.
[Nextcloud](https://nextcloud.com/) is a file sharing server that puts the control and security of your own data back into your hands.
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions library/ix-dev/charts/nextcloud/ci/basic-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ncConfig:
adminUser: admin
adminPassword: password
host: "127.0.0.1"
dataDir: /var/www/html/data
commands:
- ffmpeg
- smbclient
maxUploadLimit: 3
phpMemoryLimit: 512

ncNetwork:
webPort: 30001
nginx:
proxyTimeouts: 120
useDifferentAccessPort: false
externalAccessPort: 80

ncStorage:
pgData:
type: pvc
html:
type: pvc
data:
type: pvc
pgBackup:
type: emptyDir
emptyDirConfig:
medium: ""
size: ""
additionalStorages: []
118 changes: 118 additions & 0 deletions library/ix-dev/charts/nextcloud/ci/https-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
ncConfig:
adminUser: admin
adminPassword: password
host: "127.0.0.1"
dataDir: /var/www/html/data
commands:
- ffmpeg
- smbclient
maxUploadLimit: 3
phpMemoryLimit: 512

ncNetwork:
webPort: 30001
certificateID: 1
nginx:
proxyTimeouts: 120
useDifferentAccessPort: false
externalAccessPort: 80

ncStorage:
pgData:
type: pvc
html:
type: pvc
data:
type: pvc
pgBackup:
type: emptyDir
emptyDirConfig:
medium: ""
size: ""
additionalStorages: []

ixCertificates:
"1":
certificate: |
-----BEGIN CERTIFICATE-----
MIIEdjCCA16gAwIBAgIDYFMYMA0GCSqGSIb3DQEBCwUAMGwxDDAKBgNVBAMMA2Fz
ZDELMAkGA1UEBhMCVVMxDTALBgNVBAgMBGFzZGYxCzAJBgNVBAcMAmFmMQ0wCwYD
VQQKDARhc2RmMQwwCgYDVQQLDANhc2QxFjAUBgkqhkiG9w0BCQEWB2FAYS5jb20w
HhcNMjEwODMwMjMyMzU0WhcNMjMxMjAzMjMyMzU0WjBuMQswCQYDVQQDDAJhZDEL
MAkGA1UEBhMCVVMxDTALBgNVBAgMBGFzZGYxDTALBgNVBAcMBGFzZGYxDTALBgNV
BAoMBGFkc2YxDTALBgNVBAsMBGFzZGYxFjAUBgkqhkiG9w0BCQEWB2FAYS5jb20w
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7+1xOHRQyOnQTHFcrdasX
Zl0gzutVlA890a1wiQpdD5dOtCLo7+eqVYjqVKo9W8RUIArXWmBu/AbkH7oVFWC1
P973W1+ArF5sA70f7BZgqRKJTIisuIFIlRETgfnP2pfQmHRZtGaIJRZI4vQCdYgW
2g0KOvvNcZJCVq1OrhKiNiY1bWCp66DGg0ic6OEkZFHTm745zUNQaf2dNgsxKU0H
PGjVLJI//yrRFAOSBUqgD4c50krnMF7fU/Fqh+UyOu8t6Y/HsySh3urB+Zie331t
AzV6QV39KKxRflNx/yuWrtIEslGTm+xHKoCYJEk/nZ3mX8Y5hG6wWAb7A/FuDVg3
A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cGuTZLhwIx97Ktw3VcQ1f4rLoEYlv0xC2VWBORpzIsJo4I/OLmgp8a+Ga8z
FkVRnq90dV3t4NP9uJlHgcODHnOardC2UUka4olBSCG6zmK4Jxi34lOxhGRkshOo
L4IBeOIB5g+ZrEEXkzfYJHESRQKBgQDX2YhFhGIrT8BAnC5BbXbhm8h6Bhjz8DYL
d+qhVJjef7L/aJxViU0hX9Ba2O8CLK3FZeREFE3hJPiJ4TZSlN4evxs5p+bbNDcA
0mhRI/o3X4ac6IxdRebyYnCOB/Cu94/MzppcZcotlCekKNike7eorCcX4Qavm7Pu
MUuQ+ifmSwKBgEnchoqZzlbBzMqXb4rRuIO7SL9GU/MWp3TQg7vQmJerTZlgvsQ2
wYsOC3SECmhCq4117iCj2luvOdihCboTFsQDnn0mpQe6BIF6Ns3J38wAuqv0CcFd
DKsrge1uyD3rQilgSoAhKzkUc24o0PpXQurZ8YZPgbuXpbj5vPaOnCdBAoGACYc7
wb3XS4wos3FxhUfcwJbM4b4VKeeHqzfu7pI6cU/3ydiHVitKcVe2bdw3qMPqI9Wc
nvi6e17Tbdq4OCsEJx1OiVwFD9YdO3cOTc6lw/3+hjypvZBRYo+/4jUthbu96E+S
dtOzehGZMmDvN0uSzupSi3ZOgkAAUFpyuIKickMCgYAId0PCRjonO2thn/R0rZ7P
//L852uyzYhXKw5/fjFGhQ6LbaLgIRFaCZ0L2809u0HFnNvJjHv4AKP6j+vFQYYY
qQ+66XnfsA9G/bu4MDS9AX83iahD9IdLXQAy8I19prAbpVumKegPbMnNYNB/TYEc
3G15AKCXo7jjOUtHY01DCQ==
-----END PRIVATE KEY-----
31 changes: 31 additions & 0 deletions library/ix-dev/charts/nextcloud/ci/no-cron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ncConfig:
adminUser: admin
adminPassword: password
host: "127.0.0.1"
dataDir: /var/www/html/data
cron:
enabled: false
commands: []
maxUploadLimit: 3
phpMemoryLimit: 512

ncNetwork:
webPort: 30001
nginx:
proxyTimeouts: 120
useDifferentAccessPort: false
externalAccessPort: 80

ncStorage:
pgData:
type: pvc
html:
type: pvc
data:
type: pvc
pgBackup:
type: emptyDir
emptyDirConfig:
medium: ""
size: ""
additionalStorages: []
29 changes: 29 additions & 0 deletions library/ix-dev/charts/nextcloud/ci/nocmd-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ncConfig:
adminUser: admin
adminPassword: password
host: "127.0.0.1"
dataDir: /var/www/html/data
commands: []
maxUploadLimit: 3
phpMemoryLimit: 512

ncNetwork:
webPort: 30001
nginx:
proxyTimeouts: 120
useDifferentAccessPort: false
externalAccessPort: 80

ncStorage:
pgData:
type: pvc
html:
type: pvc
data:
type: pvc
pgBackup:
type: emptyDir
emptyDirConfig:
medium: ""
size: ""
additionalStorages: []
76 changes: 76 additions & 0 deletions library/ix-dev/charts/nextcloud/ci/onedata-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
ncConfig:
adminUser: admin
adminPassword: password
host: "127.0.0.1"
dataDir: /var/www/html/data
commands: []
maxUploadLimit: 3
phpMemoryLimit: 512

ncNetwork:
webPort: 30001
nginx:
proxyTimeouts: 120
useDifferentAccessPort: false
externalAccessPort: 80

ncStorage:
isDataInTheSameVolume: true
html:
type: hostPath
hostPathConfig:
hostPath: /mnt/{{ .Release.Name }}/test
data:
type: hostPath
hostPathConfig:
hostPath: /mnt/{{ .Release.Name }}/test
pgData:
type: pvc
pgBackup:
type: emptyDir
emptyDirConfig:
medium: ""
size: ""
additionalStorages: []

##### CI Hack #####
# What this hack does is that it will create a pod before the chart install
# A hostPath is attached to the pod, which will force k8s to create the directory on the host.
# so the actual test run will find the directory created there. (Storage attached to the actual NC chart
# uses `subPath` for which k8s will not created the directory on the host.)
workload:
ci-hack:
enabled: true
type: Job
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-weight": "1"
"helm.sh/hook-delete-policy": hook-succeeded
podSpec:
restartPolicy: Never
containers:
ci-hack:
enabled: true
primary: true
image: bashImage
command: bash
args:
- -c
- exit 0
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
persistence:
ci-hack:
enabled: true
type: hostPath
hostPath: /mnt/{{ .Release.Name }}/test/data
hostPathType: DirectoryOrCreate
targetSelector:
ci-hack:
ci-hack:
mountPath: /ci
45 changes: 0 additions & 45 deletions library/ix-dev/charts/nextcloud/ci/test-values.yaml

This file was deleted.

Loading

0 comments on commit fbc87af

Please sign in to comment.