Skip to content
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

containerd configuration for kubeadmConfigSpec overwrites Flatcar containerd config #139

Open
heytrav opened this issue Oct 9, 2023 · 1 comment

Comments

@heytrav
Copy link
Contributor

heytrav commented Oct 9, 2023

As with #138 I am attempting to build a Flatcar cluster by overriding the defaults with my own -f values.yaml.

Expected result

When I build a Flatcar cluster I expect the /etc/containerd/config.toml file to have the following content from the image builder template

## template: jinja

# Use config version 2 to enable new configuration fields.
# Config file is parsed as version 1 by default.
version = 2

imports = ["/etc/containerd/conf.d/*.toml"]

[plugins]
  [plugins."io.containerd.grpc.v1.cri"]
    sandbox_image = "registry.k8s.io/pause:3.9"
  [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
    runtime_type = "io.containerd.runc.v2"
  [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
    SystemdCgroup = true

Actual result

The cluster control plane fails to reach a healthy state.

When I log in to a control plane node I see the following:

trav-fc-refactor-38-control-plane-7752499b-j27jg ~ # cat /etc/containerd/config.toml 
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d

The openstack-cluster.kubeadmConfigSpec.containerd block executes a number of file operations including appending configuration to /etc/containerd/config.toml. This appears to overwrite the containerd config completely rather than just appending to the end of the file.

If I remove the file block here https://github.com/stackhpc/capi-helm-charts/blob/b643ff30f8541f055a471f237e28daf40fd7a273/charts/openstack-cluster/templates/_helpers.tpl#L206-L212 the contents of the containerd/config.toml file are as I expect and containerd starts normally.

@heytrav
Copy link
Contributor Author

heytrav commented Oct 10, 2023

Here is the section of my values.yaml which I am using to override controlplane and nodegroup values for Flatcar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant