-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add config parameters for k8s volume sizes #675
Conversation
Today, the storage size for Persistent Volume Claims for services like MongoDB and MySQL are hard-coded in Tutor. Make those configurable by setting template variables in defaults.yaml. This gives Tutor users the option to define volume sizes in their config.yml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on this change. The 5 GiB size for MongoDB in particular will be a problem for anyone migrating an existing Open edX codebase into tutor k8s
, so making this configurable is absolutely a welcome addition.
@foadlind I agree that the hardcoded volume size is problematic, but I disagree with the implementation that you are suggesting. When possible, I do not want to add extra settings to the Tutor configuration. Here's my reasoning:
(I admit that these decision criteria should be added to the docs or to the config/defaults.yml file) The k8s volume size is "good enough" for most people, so I'm not willing to create (and maintain) 5 extra settings to the tutor configuration. But we do need to make it easy for anyone to override these values. Currently there is no way to override values from the deployment manifests. When we run In
And
To override the volume size for a specific volume, all you would have to do is to implement the "k8s-override" patch:
This approach is much more generic than introducing new settings, and it opens the door to more extensive and powerful customizations for k8s operators. @fghaas @foadlind what do you think? |
@regisb That will certainly make it easier for users to change K8s objects with plugins. Is anyone working on making these changes in Tutor? Otherwise I can take it on. |
It would be fantastic if you could work on it @foadlind. |
Currently there is no way for plugins to customize Kubernetes resources defined in Tutor deployment manifests. This change makes that possible by taking advantage of the strategic merge patching mechanism in `kustomization.yml`. Any resource definition in a `k8s-override` patch in a plugin will override the resource defined by Tutor, provided that their names match. Reference: overhangio#675
Currently there is no way for plugins to customize Kubernetes resources defined in Tutor deployment manifests. This change makes that possible by taking advantage of the strategic merge patching mechanism in `kustomization.yml`. Any resource definition in a `k8s-override` patch in a plugin will override the resource defined by Tutor, provided that their names match. Reference: overhangio#675
Currently there is no way for plugins to customize Kubernetes resources defined in Tutor deployment manifests. This change makes that possible by taking advantage of the strategic merge patching mechanism in `kustomization.yml`. Any resource definition in a `k8s-override` patch in a plugin will override the resource defined by Tutor, provided that their names match. Reference: overhangio#675
Currently there is no way for plugins to customize Kubernetes resources defined in Tutor deployment manifests. This change makes that possible by taking advantage of the strategic merge patching mechanism in `kustomization.yml`. Any resource definition in a `k8s-override` patch in a plugin will override the resource defined by Tutor, provided that their names match. Reference: overhangio#675
Currently there is no way for plugins to customize Kubernetes resources defined in Tutor deployment manifests. This change makes that possible by taking advantage of the strategic merge patching mechanism in `kustomization.yml`. Any resource definition in a `k8s-override` patch in a plugin will override the resource defined by Tutor, provided that their names match. Reference: overhangio#675
Currently there is no way for plugins to customize Kubernetes resources defined in Tutor deployment manifests. This change makes that possible by taking advantage of the strategic merge patching mechanism in `kustomization.yml`. Any resource definition in a `k8s-override` patch in a plugin will override the resource defined by Tutor, provided that their names match. Reference: #675
is this PR abandoned? |
The "k8s-override" patch now exists, so k8s volume size can be easily overridden by a plugin. I think this is the "right" way of overriding the volume size. |
I completely agree. Therefore, we can consider this matter resolved. |
Yes, we do use a YAML plugin with a |
hi i have created a plugin k8s-override and after saving i can see the increased volume in override. i want to ask i have to apply override.yml file and thn restart thn my mongo volume will be increased . one more thing i have created another plugin for memory increment of lms so i have used k8s-deployments i can see in deployments.yml with update after this i am running tutor k8s start it is throwing error Namespace already exists: skipping creation. |
Resolved by the "k8s-override" patch. Please re-open if you think this PR is still necessary. |
Today, the storage size for Persistent Volume Claims for services like
MongoDB and MySQL are hard-coded in Tutor. Make those configurable by
setting template variables in
defaults.yaml
.This gives Tutor users the option to define volume sizes in their
config.yml
.Reference discussion: https://discuss.openedx.org/t/adding-configuration-parameters-for-persistent-volume-claim-sizes-in-tutor-k8s/7327