feat: add volume patches to mfe service and k8s#264
feat: add volume patches to mfe service and k8s#264ahmed-arb merged 5 commits intooverhangio:releasefrom
Conversation
|
@arbrandes, as we discussed last week, it would be great if you could take a look at this. |
DawoudSheraz
left a comment
There was a problem hiding this comment.
- Please add changelog entry
- Add a sub-section in README explaining the usage of HOST_EXTRA_FILES configuration. It is not clear from the changes where it will create an impact.
|
Hi @DawoudSheraz, Let me know if this meets your expectations or if any further tweaks are needed. |
0265e5d to
f78d87f
Compare
DawoudSheraz
left a comment
There was a problem hiding this comment.
Let's create this PR against release branch. main branch is supposed to contain changes for next release, breaking changes, etc. This is a new feature that does not impact any existing functionality. We can add it in release so anyone using the current tutor version (V20) can also benefit from it.
arbrandes
left a comment
There was a problem hiding this comment.
I'm approving this, but will hold off merging until @DawoudSheraz has no more concerns.
DawoudSheraz
left a comment
There was a problem hiding this comment.
A small doc update before the merge is needed.
|
@DawoudSheraz could you elaborate on what you feel is missing from the README? The intro to the new "Hosting extra static files" section doesn't say anything that implies to me that an MFE must be mounted (as opposed to be hosted as a static bundle)
|
Right. It might be due to a lack of context/understanding of all this. The newly added volume patches are clear as they are the ones serving the actual assets. For the config variable,
In readme, we can have two sub-sections, one for dev and one for local/deployment. Re-iterating my understanding, the config is needed for dev (alongside patches) and the config is not needed for local/prod since nothing is mounted in that context (usually). The current readme has everything in one section and gives the impression that one needs both config and patches to make it work. |
|
@Ang-m4 - based on @DawoudSheraz's latest comment it sounds like the logic in this PR isn't quite right. It was my understanding that we only wanted to host the extra files when |
|
@brian-smith-tcril, @DawoudSheraz, You’re right, the current logic does need a few adjustments. I’ll also take the chance to make the README clearer, especially around when the config is actually required. Thanks for pointing this out, I’ll update the PR shortly. |
|
I’ve just adjusted the logic so that hosting extra files in all environments is always controlled by the I also updated the README to reflect this behavior more clearly, so it now matches what the setting actually does. |
|
Hi @DawoudSheraz @ahmed-arb could you let us know what the next steps are in the review process? We're eager to finish out the project of supporting design tokens in Tutor. |
Hi. This will be merged as soon as @ahmed-arb completes the review. |
ahmed-arb
left a comment
There was a problem hiding this comment.
Looks good to me. Thank you, Andres, for your contribution.
Description
This pull request enhances the
tutor-mfeplugin by adding the necessary hooks to allow other plugins, such astutor-paragon, to serve static files using themfeCaddy service. This is achieved by introducing new volume patches for both local and Kubernetes deployments and updating the service logic for development environments.Note
For further context, please refer to the following discussion: openedx/openedx-tutor-plugins#38
Key Changes
Volume Support for MFE Service:
mfe-volumespatch has been added to the local Docker Compose service to allow mounting additional volumes.mfe-k8s-volumespatch has been added to the Kubernetes deployment configuration.Development Environment Enhancements:
To support hosting external files even when no MFEs are running in production mode, the
devservice logic has been updated:8002:8002) is now included to ensure themfeCaddy container is always accessible from the host.mfeservice now evaluatesor MFE_HOST_EXTRA_FILES. This handles the edge case where a user mounts all available MFEs for development (mfe_data.unmountedis empty), but still needs themfeservice to host custom files like those from Paragon.Documentation:
The
README.rsthas been updated to include documentation for the newmfe-volumesandmfe-k8s-volumespatch points.