Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Conversation

@michaelstingl
Copy link
Contributor

Summary

This PR adds Helm template validation to ensure only one office suite (Collabora or OnlyOffice) can be enabled at the same time.

Problem

Currently, the validation happens at runtime inside the OpenCloud application, leading to:

  • Confusing error messages after deployment has already started
  • Wasted time and resources
  • Poor user experience

Solution

Added a validation helper that fails fast during helm template or helm install with a clear error message.

Implementation

  1. Added opencloud.validateOfficeSuite helper in _helpers/tpl.yaml
  2. Called the validation at the beginning of the main deployment template
  3. Clear error message explains the conflict and how to fix it

Testing

# This now fails immediately with a clear error:
helm template test ./charts/opencloud \
  --set collabora.enabled=true \
  --set onlyoffice.enabled=true

# 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

# These work correctly:
helm template test ./charts/opencloud --set collabora.enabled=true
helm template test ./charts/opencloud --set onlyoffice.enabled=true

Benefits

  • ✅ Fail fast - error during template phase, not runtime
  • ✅ Clear error message with solution
  • ✅ Saves deployment time and resources
  • ✅ Better user experience

Fixes #108

- Add validateOfficeSuite helper function
- Fail fast during helm template/install with clear error message
- Prevents deployment of both Collabora and OnlyOffice simultaneously
- Better user experience than runtime errors

The validation explains that both services use the same WOPI endpoints
and cannot coexist.

Fixes #108
@michaelstingl
Copy link
Contributor Author

@mcfly-0908 @Tim-herbie - Since you both have experience with OnlyOffice in this chart, I'd appreciate your feedback on this validation improvement.

This PR prevents the confusing runtime error when both office suites are enabled by failing fast during helm template with a clear error message.

@Tim-herbie - As a reviewer with Triage permissions, your review and approval would be especially valuable!

Copy link
Contributor

@Tim-herbie Tim-herbie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add helm template validation for office suite exclusivity

3 participants