feat: Add useImageCode flag to support custom image-based deployments#847
Open
rizlas wants to merge 2 commits intonextcloud:mainfrom
Open
feat: Add useImageCode flag to support custom image-based deployments#847rizlas wants to merge 2 commits intonextcloud:mainfrom
useImageCode flag to support custom image-based deployments#847rizlas wants to merge 2 commits intonextcloud:mainfrom
Conversation
… mounts Signed-off-by: rizlas <rizlas@users.noreply.github.com>
Signed-off-by: rizlas <rizlas@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
Add
nextcloud.persistence.useImageCodeflag to skip the/var/wwwand/var/www/htmlvolume mounts when the application code is baked directly into the container image.Benefits
This enables custom image-based deployments where application code is shipped as part of the image rather than live-synced via rsync. It allows greater flexibility and supports efficient upgrades and horizontal scaling in Kubernetes environments, avoiding the default volume mounts that would otherwise shadow the image content.
As an enterprise user I found the official enterprise Helm chart unsatisfying as it only targets the AIO deployment model. Both the enterprise and community images share the same rsync-based approach for live code delivery, which makes efficient upgrades and horizontal scaling impractical in Kubernetes environments. Despite paying for an enterprise subscription, I received no direct support and found the enterprise offering to add little value over the community counterpart. In fact, this community Helm chart is superior in every regard, especially for users who need a non-AIO deployment and customisation options.
A similar proposal for supporting immutable code images was already submitted in #496, confirming this is a recurring need in the community.
Possible drawbacks
Users enabling this flag must ensure their custom image exposes all required paths correctly, as no volume mounts will be applied to
/var/wwwand/var/www/html.Additional information
I reworked the community Apache-based Docker image by removing the rsync layer and adding support for enterprise code. The custom image is available at https://github.com/ConsortiumGARR/nextcloud-docker. I am currently testing this approach and plan to open a separate PR for the Docker image as well, hoping the changes will be accepted upstream.
Checklist
Chart.yamlaccording to semver.