-
Notifications
You must be signed in to change notification settings - Fork 103
Add helm charts for nydus-snapshotter for convenient K8s deploytment #643
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Changwei Ge <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #643 +/- ##
==========================================
- Coverage 21.39% 21.28% -0.12%
==========================================
Files 122 122
Lines 13614 13687 +73
==========================================
Hits 2913 2913
- Misses 10380 10453 +73
Partials 321 321
🚀 New features to boost your workflow:
|
@changweige can we make the nydus-snapshotter-config optional? or make it available as a string in values.yaml for example ( values.yaml ):
or
Thanks |
Looks reasonable for users who has their own nydus-snapshotter config. I can improve the PR like still keep the configmap template as part of the Helm Chart, but we add a value to the Does it look good to you? |
Yes, default I guess the ultimate solution would be to merge TOML with tool like https://github.com/TomWright/dasel, this way one could edit single property like
I also noticed the RBAC is missing, for example this https://github.com/containerd/nydus-snapshotter/blob/main/misc/snapshotter/nydus-snapshotter-rbac.yaml could improve the experience with adding the additional node label after nydus installation. WDYT? |
Signed-off-by: Changwei Ge <[email protected]>
Signed-off-by: Changwei Ge <[email protected]>
Signed-off-by: Changwei Ge <[email protected]>
Good idea. I am not sure Helm gives us a chance to merge those two when rendering templates, however, at least, I can merge both the default nydus-snapshotter toml config and user's (maybe a set of override values) when performing
Yes, this PR does not contain any role definition. What kind of node labels do you think is helpful?
|
Address #612
Currently nydus-snapshotter does not have an elegant method to be deployed to a productive Kubernetes cluster. Nydus-snapshotter only release binary artifacts w/o consideration for Kubernetes. So this PR tries to pack nydus-snapshotter together with necessary nydus node components and its configurations into a Helm Chart. It makes the nydus-snapshotter installation and deployment convenient for users even if the users only intends to give a quick trial and evaluation if nydus suites their business. It's totally a standard K8s fashion. The users don't have to scan tons of documents. Yes it is just packed as a whole.
The challenge we have to solve first is that K8s applications/components(on top of DaemonSet) can be killed, rollout to upgrade, the progress should not affect any running nydusd as the user space fuse service. So we cant let nydus-snapshotter directly spawn a nydusd which is also running in the same Linux namespaces and cgroups with nydus-snapshotter. By design, nydus-snapshotter is a privileged container with host PID namespace, this means nydus-snapshotter can
nsenter
the host namespace and delegate nydusd creation tosystemd
by its utilitysystemd-run
. Nydus-snapshotter will enter host mnt namespace and callssystemd-run
to start nydusd as a transient service. So deleting nydus-snapshotter daemonset and helm release, rollout daemonset, killing nydus-snapshotter won't affect running nydusd, which means user's business is continuous across those processes.As for the details of the deployment architecture:
DaemonSet:
ConfigMap:
Besides, nydus-snapshotter will modify containerd config.toml to integrate with nydus-snapshotter and restart containerd if necessary.
To test and try, just at the root of the code project and perform