-
Notifications
You must be signed in to change notification settings - Fork 9
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
node-installer: configure and run tardev-snapshotter #697
Conversation
Signed-off-by: Paul Meyer <[email protected]>
Signed-off-by: Paul Meyer <[email protected]>
6e7f5ce
to
c0307ab
Compare
Signed-off-by: Paul Meyer <[email protected]>
c0307ab
to
a249004
Compare
@@ -199,19 +199,23 @@ func patchContainerdConfig(runtimeName, basePath, configPath string, platform pl | |||
existing = constants.ContainerdBaseConfig() | |||
} | |||
|
|||
snapshotterName := "no-snapshotter" |
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.
Why is this not tardev-$hash
?
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.
It is set to that a few lines below in case we are on a platform that uses a snapshotter.
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.
Ah, I see - thanks.
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.
Interestingly, we're already switching on the platform outside these functions:
contrast/node-installer/node-installer.go
Lines 128 to 141 in 59826da
switch platform { | |
case platforms.AKSCloudHypervisorSNP: | |
// AKS or any external-containerd based K8s distro: We can just patch the existing containerd config at /etc/containerd/config.toml | |
if err := patchContainerdConfig(config.RuntimeHandlerName, runtimeBase, containerdConfigPath, platform); err != nil { | |
return fmt.Errorf("patching containerd configuration: %w", err) | |
} | |
case platforms.K3sQEMUTDX, platforms.RKE2QEMUTDX: | |
// K3s or RKE2: We need to extend the configuration template, which, in it's un-templated form, is non-TOML. | |
// Therefore just write the TOML configuration fragment ourselves and append it to the template file. | |
// This assumes that the user does not yet have a runtime with the same name configured himself, | |
// but as our runtimes are hash-named, this should be a safe assumption. | |
if err := patchContainerdConfigTemplate(config.RuntimeHandlerName, runtimeBase, containerdConfigPath, platform); err != nil { | |
return fmt.Errorf("patching containerd configuration: %w", err) | |
} |
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.
That's indeed confusing (but necessary with the current structure, as some platforms won't call patchContainerdConfig.
@@ -199,19 +199,23 @@ func patchContainerdConfig(runtimeName, basePath, configPath string, platform pl | |||
existing = constants.ContainerdBaseConfig() | |||
} | |||
|
|||
snapshotterName := "no-snapshotter" |
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.
Ah, I see - thanks.
With this change, we improve the stability of Contrast by deploying our own tardev-snapshotter on the host as part of the node-installer deployment. Previously, the Contrast runtime would use the tardev-snapshotter installed on the host, which is managed by Azure. However, the snapshotter is highly coupled with the guest image, and breaking changes to the snaphotter led to workload pods not being able to start in Contrast. Therefore, we are shipping a pinned snapshotter as part of the runtime. This will also allow running multiple Contrast runtime next to each other that require different versions of the snapshotter.