-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adds configurable containerd base dir during bootstrap / join #817
base: main
Are you sure you want to change the base?
Adds configurable containerd base dir during bootstrap / join #817
Conversation
src/k8s/go.mod
Outdated
@@ -177,3 +177,5 @@ require ( | |||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect | |||
sigs.k8s.io/yaml v1.4.0 // indirect | |||
) | |||
|
|||
replace github.com/canonical/k8s-snap-api v1.0.13 => github.com/claudiubelu/k8s-snap-api v0.0.0-20241119131040-dc75989e4d14 |
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.
NOTE: this change and the go.sum
one is only for testing purposes.
if req.ContainerdBaseDir != "" { | ||
e.provider.Snap().SetContainerdBaseDir(req.ContainerdBaseDir) | ||
} |
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.
I would rather see this in ClusterConfig's SetDefaults().
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.
We don't want this option to be part of the CLI. This should be an optional entry in the bootstrap config file.
60e1613
to
ba46ef5
Compare
Currently, for the classic k8s snap, the default locations for the containerd-related files are: - /etc/containerd/ - /run/containerd/ - /var/lib/containerd/ These paths can conflict with other containerd installations on the host (e.g. from docker), meaning that the k8s snap cannot be installed. In a developer's usecase, we shouldn't require the other services to be disabled, but we can allow the k8s snap's containerd to be installed in a different location during bootstrap / node join. Adds the --containerd-base-dir option for k8s bootstrap and join-cluster commands. If not given, the snap's default paths will be used instead. After the node was initialized, save the containerd base location in a file, so we can properly reference it later / on restart.
ba46ef5
to
a862186
Compare
Instead of creating a new feature, can this be set by the ExtraContainerdArgs bootstrap option we already have? |
Adds configurable containerd base dir during bootstrap / join
Currently, for the classic k8s snap, the default locations for the containerd-related files are:
These paths can conflict with other containerd installations on the host (e.g. from docker), meaning that the k8s snap cannot be installed. In a developer's usecase, we shouldn't require the other services to be disabled, but we can allow the k8s snap's containerd to be installed in a different location during bootstrap / node join.
Adds the
--containerd-base-dir
option for k8s bootstrap and join-cluster commands. If not given, the snap's default paths will be used instead. After the node was initialized, save the containerd base location in a file, so we can properly reference it later / on restart.Depends-On: canonical/k8s-snap-api#19