-
Notifications
You must be signed in to change notification settings - Fork 269
✨ Add flatcar-sysext
template to use regular Flatcar images
#1776
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
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/retest (cloud-init is failing to provision the devstack instance) |
b63aa28
to
0dd9a8b
Compare
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've left some comments, but as you're our flatcar maintainer I'm happy for you to merge this whenever you see fit.
* Build the image with the [image-builder](https://image-builder.sigs.k8s.io/capi/providers/openstack.html): `make OEM_ID=openstack build-qemu-flatcar` | ||
* Export the name of the uploaded image: `export OPENSTACK_FLATCAR_IMAGE_NAME=flatcar-stable-3374.2.5-kube-v1.25.6` | ||
* When generating the cluster configuration, use the following Cluster API [flavor](https://cluster-api.sigs.k8s.io/clusterctl/commands/generate-cluster.html?#flavors): `--flavor flatcar` (_NOTE_: Don't forget to refer to the [external-cloud-provider](https://cluster-api-openstack.sigs.k8s.io/topics/external-cloud-provider.html) section) | ||
Flatcar comes in two [flavor][flavor] variant: |
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.
nit: variants.
# Fixme(lentzi90): This is here just to override the value set in the default | ||
# kustomization. It will be replaced with a value that works for flatcar in | ||
# https://github.com/kubernetes-sigs/cluster-api-provider-openstack/pull/1564 | ||
provider-id: null |
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.
Are we able to update this now?
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.
See: #1564 (comment)
ExecStartPost=/usr/bin/sh -c "if ! cmp --silent /tmp/kubernetes /tmp/kubernetes-new; then touch /run/reboot-required; fi" | ||
- name: update-engine.service | ||
# Set this to 'false' if you want to enable Flatcar auto-update | ||
masked: true |
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.
Do you want a config variable for this? Maybe ${FLATCAR_DISABLE_AUTO_UPDATE:=true}
?
If you do I'd try to minimise the number of config variables you add here, and below as they're presumably highly correlated.
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.
Oh thanks. I did not know it was possible to have this kind of optional variable:
clusterctl generate cluster ... --list-variables
...
Optional Variables:
- FLATCAR_DISABLE_AUTO_UPDATE (defaults to "true")
NOTE: It's fine to only have the update-engine.service
to be customizable as the usage of locksmithd
is not recommended to manage the reboot of the instance (kured
is a better choice).
- mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate |
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 feel like we should be able to DRY this.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mdbooth, tormath1 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
0dd9a8b
to
f50a95b
Compare
This template allows to use a plain Flatcar image from the Flatcar release server without building with the image-builder. This template will consume Kubernetes systemd-sysext image from the flatcar/sysext-bakery release artifacts. This template will emit a /run/reboot-required file flag when a new Kubernetes release has been downloaded and that we need to coordinate the reboot of the node using Kured for example. Signed-off-by: Mathieu Tortuyaux <[email protected]> Co-authored-by: Kai Lüke <[email protected]>
This test consumes the flatcar-sysext template to deploy a workload cluster. It uses a plain Flatcar OpenStack image from the release servers as it does not need to rely on the image-builder built image. Signed-off-by: Mathieu Tortuyaux <[email protected]>
Signed-off-by: Mathieu Tortuyaux <[email protected]> Co-authored-by: Kai Lüke <[email protected]>
f50a95b
to
5a39a20
Compare
/retest First fail was a devstack issue - now it's the default scenario:
|
/unhold |
@@ -64,7 +64,8 @@ | |||
IMAGE_URLS+="https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/cirros/2022-12-05/cirros-0.6.1-x86_64-disk.img," | |||
IMAGE_URLS+="https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/ubuntu/2023-09-29/ubuntu-2204-kube-v1.27.2.img," | |||
IMAGE_URLS+="https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/ubuntu/2023-09-29/ubuntu-2204-kube-v1.28.2.img," | |||
IMAGE_URLS+="https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/flatcar/flatcar-stable-3602.2.0-kube-v1.28.2.img" | |||
IMAGE_URLS+="https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/flatcar/flatcar-stable-3602.2.0-kube-v1.28.2.img," | |||
IMAGE_URLS+="https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_openstack_image.img" |
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 don't have enough experience to tell if that's ok to include an image from another endpoint than other images in the list. I'm sure there is a good reason to have them stored on google vs others. I'll let the maintainers to comment on this one.
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.
/lgtm |
What this PR does / why we need it: In this PR, we add a new template:
flatcar-sysext
. This template has two main benefits:image-builder
requirement)Special notes for your reviewer: This can solve the question of providing CAPO image for Flatcar - as a user can directly consume the upstream image.
Some resources:
TODOs:
/hold