-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: Support Flatcar OS and custom NTP servers #44
Conversation
by doing this, we're fully committing to Flatcar and not running anything on Ubuntu. I think the cleaner thing is that we should create a variable called And then, we should create a patch, conditional on Then, we will have to update the driver to detect |
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.
good progress, let's make sure to switch to patches on the ClusterClass as mentioned
Also, let's update title to be feat
since this is a feature addition.
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.
small nits, otherwise is this ready to land @okozachenko1203 -- shall we drop the WIP?
@mnaser |
I close this kubernetes-sigs/image-builder#1018 and land openstack provider specific override in this driver. |
# https://github.com/flatcar/Flatcar/issues/823 | ||
"ansible_user_vars": "oem_id=openstack", |
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.
nice catch here.
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.
There is a lot of hacks around this because we're using an ISO image, @okozachenko1203 is going to contribute to image-builder
an openstack
image so that it uses OpenStack to deploy and publish directly to Glance.
Once we have that in place, we should switch the image builder to use that instead. It'll drive down the dependencies and we can remove this after.
# https://github.com/flatcar/Flatcar/issues/823 | ||
"ansible_user_vars": "oem_id=openstack", |
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.
There is a lot of hacks around this because we're using an ISO image, @okozachenko1203 is going to contribute to image-builder
an openstack
image so that it uses OpenStack to deploy and publish directly to Glance.
Once we have that in place, we should switch the image builder to use that instead. It'll drive down the dependencies and we can remove this after.
units: | ||
- name: coreos-metadata.service | ||
dropins: | ||
- name: 20-clct-provider-override.conf | ||
contents: | | ||
[Service] | ||
# Set Openstack as coreos-metadata provider | ||
Environment=COREOS_METADATA_OPT_PROVIDER=--provider=openstack-metadata | ||
- name: [email protected] | ||
enabled: true | ||
dropins: | ||
- name: 20-clct-provider-override.conf | ||
contents: | | ||
[Service] | ||
# Set Openstack as coreos-metadata provider | ||
Environment=COREOS_METADATA_OPT_PROVIDER=--provider=openstack-metadata |
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 can remove this after moving to openstack built images.
- name: coreos-metadata.service | ||
dropins: | ||
- name: 20-clct-provider-override.conf | ||
contents: | | ||
[Service] | ||
Environment=COREOS_METADATA_OPT_PROVIDER=--provider=openstack-metadata | ||
- name: [email protected] | ||
enabled: true | ||
dropins: | ||
- name: 20-clct-provider-override.conf | ||
contents: | | ||
[Service] | ||
Environment=COREOS_METADATA_OPT_PROVIDER=--provider=openstack-metadata |
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 can remove this after moving to openstack built images
- name: kubeadm.service | ||
dropins: | ||
- name: 10-flatcar.conf | ||
contents: | | ||
[Unit] | ||
# kubeadm must run after coreos-metadata populated /run/metadata directory. | ||
Requires=coreos-metadata.service | ||
After=coreos-metadata.service | ||
[Service] | ||
# Ensure kubeadm service has access to kubeadm binary in /opt/bin on Flatcar. | ||
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/bin | ||
# To make metadata environment variables available for pre-kubeadm commands. | ||
EnvironmentFile=/run/metadata/* | ||
""" # noqa: E501 |
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.
this feels like it should live inside image-builder
, so I think as a separate PR we should fix this?
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.
The PATH modifying part should not be needed anymore since kubernetes-sigs/image-builder@f4864de, but I think dependence on coreos-metadata.service
is platform-specific, so I don't think image-builder
is a good place to put this.
- name: kubeadm.service | ||
dropins: | ||
- name: 10-flatcar.conf | ||
contents: | | ||
[Unit] | ||
# kubeadm must run after coreos-metadata populated /run/metadata directory. | ||
Requires=coreos-metadata.service | ||
After=coreos-metadata.service | ||
[Service] | ||
# In Flatcar /usr is immutable, so image-builder puts the binaries in /opt/bin instead. | ||
# Ensure kubeadm service has access to kubeadm binary in /opt/bin on Flatcar. | ||
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/bin | ||
# To make metadata environment variables available for pre-kubeadm commands. | ||
EnvironmentFile=/run/metadata/* | ||
""" # noqa: E501 |
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.
same for this
Hello, Flatcar is now supported by CAPO - did you give a try with Magnum recently ? @mnaser I see you're in the #cluster-api-openstack Slack channel, do not hesitate to ping me if you need a hand on this topic. :) |
I think perhaps maybe if there's some documentation on building images and how clusters are defined for a flatcar system.. that would be helpful |
@mnaser there is this documentation on the CAPO handbook: https://cluster-api-openstack.sigs.k8s.io/clusteropenstack/configuration.html#ignition-based-images to build and use Flatcar images (and as you know there is this issue: kubernetes-sigs/cluster-api-provider-openstack#1502) |
I am waiting for the NTP fix as on autoscaling it is not possible to always change the internal NTP server. Can the NTP fix be extracted so it can be merged @okozachenko1203 ? |
@Mazorius you shouldn't have any ntp issues with the latest images as you'll be getting the NTP server from DHCP, and the Flatcar part has been merged so I'm closing thsi |
fix #42
fix #45
MAGNUM-2