diff --git a/charts/opencloud/templates/_helpers/tpl.yaml b/charts/opencloud/templates/_helpers/tpl.yaml index 83b9b613..ffe388f9 100644 --- a/charts/opencloud/templates/_helpers/tpl.yaml +++ b/charts/opencloud/templates/_helpers/tpl.yaml @@ -184,3 +184,13 @@ Return the appropriate apiVersion for ingress {{- print "networking.k8s.io/v1beta1" -}} {{- end -}} {{- end -}} + +{{/* +Validate office suite configuration +Ensures that only one of Collabora or OnlyOffice can be enabled at the same time +*/}} +{{- define "opencloud.validateOfficeSuite" -}} +{{- if and .Values.collabora.enabled .Values.onlyoffice.enabled }} + {{- fail "Error: Only one of Collabora or OnlyOffice can be enabled at the same time! Both services use the same WOPI endpoints and cannot coexist. Please set either collabora.enabled=false or onlyoffice.enabled=false" }} +{{- end }} +{{- end -}} diff --git a/charts/opencloud/templates/opencloud/deployment.yaml b/charts/opencloud/templates/opencloud/deployment.yaml index 1cafc17a..8f316a28 100644 --- a/charts/opencloud/templates/opencloud/deployment.yaml +++ b/charts/opencloud/templates/opencloud/deployment.yaml @@ -1,4 +1,5 @@ {{- if .Values.opencloud.enabled }} +{{- include "opencloud.validateOfficeSuite" . }} apiVersion: apps/v1 kind: Deployment metadata: