add: helm chart changes

This commit is contained in:
bubu
2026-05-31 03:53:33 +02:00
parent f6817f83e6
commit d707200055
8 changed files with 36 additions and 57 deletions
-2
View File
@@ -6,9 +6,7 @@ metadata:
data:
OXICLOUD_SERVER_PORT: {{ .Values.config.server.port | quote }}
OXICLOUD_SERVER_HOST: {{ .Values.config.server.host | quote }}
{{- if .Values.config.server.baseUrl }}
OXICLOUD_BASE_URL: {{ .Values.config.server.baseUrl | quote }}
{{- end }}
OXICLOUD_ENABLE_AUTH: {{ .Values.config.features.enableAuth | quote }}
OXICLOUD_ENABLE_FILE_SHARING: {{ .Values.config.features.enableSharing | quote }}
MIMALLOC_PURGE_DELAY: {{ .Values.config.mimalloc.purgeDelay | quote }}
+10 -5
View File
@@ -11,11 +11,16 @@ data:
{{- if .Values.secrets.jwtSecret }}
OXICLOUD_JWT_SECRET: {{ .Values.secrets.jwtSecret | b64enc | quote }}
{{- end }}
{{- if .Values.postgresql.enabled }}
DB_PASSWORD: {{ .Values.postgresql.auth.password | b64enc | quote }}
{{- end }}
{{- if .Values.wopi.enabled }}
WOPI_ADMIN_USERNAME: {{ .Values.wopi.collabora.admin.username | b64enc | quote }}
WOPI_ADMIN_PASSWORD: {{ .Values.wopi.collabora.admin.password | b64enc | quote }}
{{- /* Existing secret retrieval to keep same password during upgrade */-}}
{{- $secretName := printf "%s-secret" (include "oxicloud.fullname" .) }}
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace $secretName }}
{{- $password := "" }}
{{- if and $existingSecret (hasKey $existingSecret.data "WOPI_ADMIN_PASSWORD") }}
{{- $password = index $existingSecret.data "WOPI_ADMIN_PASSWORD" }}
{{- else }}
{{- $password = .Values.wopi.collabora.admin.password | default (randAlphaNum 20) | b64enc }}
{{- end }}
WOPI_ADMIN_PASSWORD: {{ $password | quote }}
{{- end }}
{{- end }}
+9 -11
View File
@@ -15,8 +15,12 @@ spec:
labels:
{{- include "oxicloud.selectorLabels" . | nindent 8 }}
spec:
{{- if and .Values.persistence.enabled .Values.persistence.fsGroup }}
securityContext:
fsGroup: {{ .Values.persistence.fsGroup }}
{{- end }}
containers:
- name: oxicloud
- name: oxicloud-app
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
@@ -26,19 +30,13 @@ spec:
envFrom:
- configMapRef:
name: {{ include "oxicloud.fullname" . }}-config
- secretRef:
name: {{ if .Values.secrets.existingSecret }}{{ .Values.secrets.existingSecret }}{{ else }}{{ include "oxicloud.fullname" . }}-secret{{ end }}
{{- if .Values.envs }}
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ if .Values.secrets.existingSecret }}{{ .Values.secrets.existingSecret }}{{ else }}{{ include "oxicloud.fullname" . }}-secret{{ end }}
key: DB_PASSWORD
- name: OXICLOUD_DB_CONNECTION_STRING
value: "postgres://{{ .Values.postgresql.auth.username }}:$(DB_PASSWORD)@{{ .Release.Name }}-postgresql/{{ .Values.postgresql.auth.database }}"
{{- toYaml .Values.envs | nindent 12 }}
{{- end }}
volumeMounts:
- name: storage-data
mountPath: /app/storage
mountPath: {{ .Values.persistence.mountPath | default "/app/storage" }}
{{- if not .Values.persistence.enabled }}
volumes:
- name: storage-data
@@ -40,10 +40,7 @@ spec:
- name: extra_params
value: {{ .Values.wopi.collabora.extraParams | quote }}
- name: username
valueFrom:
secretKeyRef:
name: {{ if .Values.secrets.existingSecret }}{{ .Values.secrets.existingSecret }}{{ else }}{{ include "oxicloud.fullname" . }}-secret{{ end }}
key: WOPI_ADMIN_USERNAME
value: admin
- name: password
valueFrom:
secretKeyRef: