-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add ignition support in bootstrap provider #3430
Comments
/kind design |
@dongsupark thanks for opening this! We use quite a bit of Flatcar and were looking into adding this support a while back and we were struggling to think of the right way to handle the "immutability" of it in the AWS provider, for example. CAPA kind of assumes the AMI has the correct version of kubeadm on it, so I was curious if you'd thought about this at all. If I understand CoreOS/Flatcar correctly, it's not best practice to publish a bunch of different machine images - you'd use the official release image and then use systemd units, etc to make sure your dependencies were installed. Would love to hear your thoughts. I acknowledge that this isn't strictly related to this issue, though 😅. |
You are right. |
/milestone v0.3.x Synced up with @dongsupark on slack, we're going to copy and adapt the CABPK bootstrapper and provide new types and controllers for the |
/milestone Next |
@vincepri curious, would this support need to be include in the v1alpha1 roadmap? |
(asking as I joined the call today and was looking over #3754) |
(Assuming you meant v1alpha4) We can just add it to the roadmap, we just need someone assigned to push it forward. There is also the node agent talks that came up from #2554, which might be of interest for you all |
@vincepri yes, sorry v1alpha4. And yes, that issue is very related. The secrets access is part of cloud-init on AWS that we can not support currently, and upstream ignition has rejected the multi-part mime support needed for handling these secrets on AWS. It's not an ideal spot. |
I was look at #3761, and it's the basis of my ^^ comment. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Hey all, I had a look into #3437 and comments there and I plan to open a replacement PR to solve this issue, but wanted to share my idea for solving it before completing this work. I would like to propose the following move things forward:
Now, cloud-init config generated by CABPK together with fields exposed by CABPK core uses 2 features of cloud-init for bootstrapping: For
However, cloud-init additionally offers Jinja templating for all files which will be written, which is used for example by CAPA (example). Such feature is not available with Ignition. Fortunately CABPK does not use templating for bootstrapping files, except settings which might be controlled by user (like in CAPA example), which makes things a bit simpler, as templating can be moved to infrastructure provider (cluster configuration template). If user needs to template some parts of the configuration, they can use Also, as far as I saw, no major Infrastructure provider use templating extensively or in options other than writing files. To break down "additional" fields in
kind: KubeadmControlPlane
spec:
kubeadmConfigSpec:
ignition:
containerLinuxConfig:
additionalConfig: |
---
systemd:
units: ... Right now Fedora CoreOS uses Ignition version 3.0+ and Flatcar is still using 2.3 and as suggested in #3437 (comment), only 3.0+ should be used right now, which can optionally be downgraded to 2.3-compatible format. Having the structure above will keep enough space to extend the structure in the future to something like: kind: KubeadmControlPlane
spec:
kubeadmConfigSpec:
ignition:
fedoraCoreOSConfig: Or: kind: KubeadmControlPlane
spec:
kubeadmConfigSpec:
ignition:
containerLinuxConfig:
version: 3.0
additionalConfig: |
---
systemd:
units: ...
Please let me know what you think and if such addition would be acceptable :) BTW I've already create a PoC for it which is available at https://github.com/kinvolk/cluster-api/commits/invidian/ignition-support. It requires more work though. |
I personally think that the suggestion made by @invidian is quite sound. It would make life for ignition users a lot simpler and offers a nice basis for integration. |
Opened PR with changes proposed above: #4172. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/lifecycle frozen |
/lifecycle active |
/assign @invidian |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
/lifecycle active |
I just wanted to drop that Jinja templating is not exclusive for cloud-init. You can use it to template whatever you like. All you need is a working Jinja install and a Jinja formatted template. |
Detailed Description
In CABPK,
KubeadmConfig.Spec
already hasFormat
field, which is used to specify the output format of the bootstrap data that the controller generates. At the moment the field is not used anywhere. So CABPK always relies on cloud-init.We can use the field to support other types of bootstrap configs, other than the default cloud-init. It would be a good use case to add
ignition
, used by Flatcar Container Linux or Fedora CoreOS.Previous attempts:
There has been a project cluster-api-bootstrap-provider-kubeadm-ignition, which is actually a fork of another repo. Though the original repo from
minsheng-fintech
was recently removed, I am not sure why. I tried to contact the original author, but so far could not hear anything from him.Anyway based on the code, I have created a PoC branch on top of the current cluster-api code base. Of course it is still up for discussions.
Related issues:
#1576
#1582
#3064
/kind feature
/area bootstrap
/cc @vbatts @t-lo @ncdc @vincepri @detiber
The text was updated successfully, but these errors were encountered: