Skip to content

Commit 41356b6

Browse files
authored
Merge pull request #409 from jonathansmith9485/397/bug/helm_chart_correction
FIX : bug 397 add: helm chart changes
2 parents f6817f8 + d707200 commit 41356b6

8 files changed

Lines changed: 36 additions & 57 deletions

File tree

charts/oxicloud/Chart.lock

Lines changed: 0 additions & 7 deletions
This file was deleted.

charts/oxicloud/Chart.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,4 @@ description: |
55
Ultra-fast, secure & lightweight self-hosted cloud storage — your files, photos, calendars & contacts, all in one place. Built in Rust.
66
type: application
77
version: 0.1.0
8-
appVersion: "0.5.2"
9-
10-
dependencies:
11-
- name: postgresql
12-
version: 18.5.6
13-
repository: https://charts.bitnami.com/bitnami
14-
condition: postgresql.enabled
8+
appVersion: "0.5.6"

charts/oxicloud/templates/configmap.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ metadata:
66
data:
77
OXICLOUD_SERVER_PORT: {{ .Values.config.server.port | quote }}
88
OXICLOUD_SERVER_HOST: {{ .Values.config.server.host | quote }}
9-
{{- if .Values.config.server.baseUrl }}
109
OXICLOUD_BASE_URL: {{ .Values.config.server.baseUrl | quote }}
11-
{{- end }}
1210
OXICLOUD_ENABLE_AUTH: {{ .Values.config.features.enableAuth | quote }}
1311
OXICLOUD_ENABLE_FILE_SHARING: {{ .Values.config.features.enableSharing | quote }}
1412
MIMALLOC_PURGE_DELAY: {{ .Values.config.mimalloc.purgeDelay | quote }}

charts/oxicloud/templates/secret.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ data:
1111
{{- if .Values.secrets.jwtSecret }}
1212
OXICLOUD_JWT_SECRET: {{ .Values.secrets.jwtSecret | b64enc | quote }}
1313
{{- end }}
14-
{{- if .Values.postgresql.enabled }}
15-
DB_PASSWORD: {{ .Values.postgresql.auth.password | b64enc | quote }}
16-
{{- end }}
1714
{{- if .Values.wopi.enabled }}
18-
WOPI_ADMIN_USERNAME: {{ .Values.wopi.collabora.admin.username | b64enc | quote }}
19-
WOPI_ADMIN_PASSWORD: {{ .Values.wopi.collabora.admin.password | b64enc | quote }}
15+
{{- /* Existing secret retrieval to keep same password during upgrade */-}}
16+
{{- $secretName := printf "%s-secret" (include "oxicloud.fullname" .) }}
17+
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace $secretName }}
18+
{{- $password := "" }}
19+
{{- if and $existingSecret (hasKey $existingSecret.data "WOPI_ADMIN_PASSWORD") }}
20+
{{- $password = index $existingSecret.data "WOPI_ADMIN_PASSWORD" }}
21+
{{- else }}
22+
{{- $password = .Values.wopi.collabora.admin.password | default (randAlphaNum 20) | b64enc }}
23+
{{- end }}
24+
WOPI_ADMIN_PASSWORD: {{ $password | quote }}
2025
{{- end }}
2126
{{- end }}

charts/oxicloud/templates/statefulset.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ spec:
1515
labels:
1616
{{- include "oxicloud.selectorLabels" . | nindent 8 }}
1717
spec:
18+
{{- if and .Values.persistence.enabled .Values.persistence.fsGroup }}
19+
securityContext:
20+
fsGroup: {{ .Values.persistence.fsGroup }}
21+
{{- end }}
1822
containers:
19-
- name: oxicloud
23+
- name: oxicloud-app
2024
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
2125
imagePullPolicy: {{ .Values.image.pullPolicy }}
2226
ports:
@@ -26,19 +30,13 @@ spec:
2630
envFrom:
2731
- configMapRef:
2832
name: {{ include "oxicloud.fullname" . }}-config
29-
- secretRef:
30-
name: {{ if .Values.secrets.existingSecret }}{{ .Values.secrets.existingSecret }}{{ else }}{{ include "oxicloud.fullname" . }}-secret{{ end }}
33+
{{- if .Values.envs }}
3134
env:
32-
- name: DB_PASSWORD
33-
valueFrom:
34-
secretKeyRef:
35-
name: {{ if .Values.secrets.existingSecret }}{{ .Values.secrets.existingSecret }}{{ else }}{{ include "oxicloud.fullname" . }}-secret{{ end }}
36-
key: DB_PASSWORD
37-
- name: OXICLOUD_DB_CONNECTION_STRING
38-
value: "postgres://{{ .Values.postgresql.auth.username }}:$(DB_PASSWORD)@{{ .Release.Name }}-postgresql/{{ .Values.postgresql.auth.database }}"
35+
{{- toYaml .Values.envs | nindent 12 }}
36+
{{- end }}
3937
volumeMounts:
4038
- name: storage-data
41-
mountPath: /app/storage
39+
mountPath: {{ .Values.persistence.mountPath | default "/app/storage" }}
4240
{{- if not .Values.persistence.enabled }}
4341
volumes:
4442
- name: storage-data

charts/oxicloud/templates/wopi-deployment.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ spec:
4040
- name: extra_params
4141
value: {{ .Values.wopi.collabora.extraParams | quote }}
4242
- name: username
43-
valueFrom:
44-
secretKeyRef:
45-
name: {{ if .Values.secrets.existingSecret }}{{ .Values.secrets.existingSecret }}{{ else }}{{ include "oxicloud.fullname" . }}-secret{{ end }}
46-
key: WOPI_ADMIN_USERNAME
43+
value: admin
4744
- name: password
4845
valueFrom:
4946
secretKeyRef:

charts/oxicloud/values.yaml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
replicaCount: 1
33

44
image:
5-
repository: oxicloud
5+
repository: diocrafts/oxicloud
66
pullPolicy: IfNotPresent
7-
tag: "latest"
7+
tag: "0.5.6"
8+
9+
# cf : https://github.com/AtalayaLabs/OxiCloud/blob/main/example.env
10+
envs:
11+
- name: OXICLOUD_DB_CONNECTION_STRING
12+
value: "postgres://postgres:postgres@postgres/oxicloud"
13+
- name: OXICLOUD_STORAGE_PATH
14+
value: /app/storage
15+
- name: OXICLOUD_STATIC_PATH
16+
value: /app/static
817

9-
postgresql:
10-
enabled: true
11-
auth:
12-
username: postgres
13-
password: "change_me_in_production"
14-
database: oxicloud
15-
primary:
16-
persistence:
17-
enabled: true
18-
size: 8Gi
1918

2019
config:
2120
server:
@@ -47,23 +46,16 @@ wopi:
4746
port: 9980
4847
admin:
4948
username: admin
50-
password: "wopi_admin_password"
5149
# In production behind an ingress, you'd likely enable SSL termination.
5250
extraParams: "--o:ssl.enable=false --o:ssl.termination=false --o:net.frame_ancestors=http://* https://*"
5351

54-
secrets:
55-
# If existingSecret is set, the chart will NOT create a Secret and will use this one instead.
56-
existingSecret: ""
57-
jwtSecret: ""
58-
oidcClientSecret: ""
59-
6052
service:
6153
type: ClusterIP
6254
port: 8086
6355

6456
ingress:
6557
enabled: true
66-
className: "nginx" # Adjust to your ingress controller (e.g., traefik)
58+
className: "traefik" # Adjust to your ingress controller (e.g., traefik)
6759
annotations: {}
6860
hosts:
6961
- host: cloud.example.com
@@ -73,4 +65,4 @@ ingress:
7365
tls: []
7466
# - secretName: oxicloud-tls
7567
# hosts:
76-
# - cloud.example.com
68+
# - cloud.example.com

docs/guide/installation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ cargo run --release
7070
`OXICLOUD_DB_CONNECTION_STRING` is the runtime setting read by OxiCloud. `DATABASE_URL` is only needed for SQLx build-time checks.
7171

7272
## Kubernetes (Helm)
73+
* Please note the and external postgresql is required (for instance, create it with cncf postgreqsl operator), More information [HERE](https://cloudnative-pg.io/)
74+
* Please pay attention to pvc name change if you are using this charte with an already existing installation, you'll have to migrate the data.
7375

7476
```bash
7577
helm upgrade --install oxicloud charts/oxicloud \

0 commit comments

Comments
 (0)