Skip to content

Commit

Permalink
template/flatcar-sysext: use marketplace images
Browse files Browse the repository at this point in the history
Gallery images was the solution used for publishing Flatcar CAPZ images.
We can now directly use marketplace images as Flatcar sysext template does not
need images from the image-builder but can use a regular Flatcar images
(which is automatically published at each release)

Signed-off-by: Mathieu Tortuyaux <[email protected]>
  • Loading branch information
tormath1 committed Nov 18, 2024
1 parent 7e9ebb9 commit 2ccc908
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 26 deletions.
16 changes: 8 additions & 8 deletions docs/book/src/self-managed/flatcar.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CAPZ enables you to create Kubernetes clusters using Flatcar Container Linux on

### The `flatcar-sysext` flavor (**recommended**)

This variant relies on a vanilla Flatcar Community Gallery image which leverages the [systemd-sysext](https://www.flatcar.org/docs/latest/provisioning/sysext/) feature to install and update Kubernetes components. The Kubernetes version is not bound to the Flatcar version (i.e. Flatcar can be upgraded independently from Kubernetes and vice versa).
This variant relies on a vanilla Flatcar marketplace image which leverages the [systemd-sysext](https://www.flatcar.org/docs/latest/provisioning/sysext/) feature to install and update Kubernetes components. The Kubernetes version is not bound to the Flatcar version (i.e. Flatcar can be upgraded independently from Kubernetes and vice versa).

The template comes with a [systemd-sysupdate](https://www.freedesktop.org/software/systemd/man/latest/sysupdate.d.html) configuration file that will download each new patch version of Kubernetes (i.e. if you start with Kubernetes 1.x.y, systemd-sysupdate will automatically pull 1.x.y+1 but not 1.x+1.y). Please note that this behavior is disabled by default. To enable the Kubernetes auto-update you can:
* Update the template to enable the `systemd-sysupdate.timer`
Expand All @@ -18,13 +18,13 @@ To coordinate the node reboot, we recommend using [Kured](https://github.com/kub

Find the latest published images:
```console
az sig image-version list --gallery-image-definition flatcar-stable-amd64 --gallery-name flatcar --resource-group flatcar-image-gallery-publishing -o table
Location Name ProvisioningState ResourceGroup
---------- -------- ------------------- --------------------------------
westeurope 3374.2.0 Succeeded flatcar-image-gallery-publishing
westeurope 3374.2.1 Succeeded flatcar-image-gallery-publishing
westeurope 3374.2.3 Succeeded flatcar-image-gallery-publishing
....
az vm image list --offer flatcar-container-linux-corevm-amd64 --publisher kinvolk --sku stable-gen2 -o table --all
Architecture Offer Publisher Sku Urn Version
-------------- ------------------------------------ ----------- ----------- ----------------------------------------------------------------- ---------
...
x64 flatcar-container-linux-corevm-amd64 kinvolk stable-gen2 kinvolk:flatcar-container-linux-corevm-amd64:stable-gen2:3975.2.0 3975.2.0
x64 flatcar-container-linux-corevm-amd64 kinvolk stable-gen2 kinvolk:flatcar-container-linux-corevm-amd64:stable-gen2:3975.2.1 3975.2.1
x64 flatcar-container-linux-corevm-amd64 kinvolk stable-gen2 kinvolk:flatcar-container-linux-corevm-amd64:stable-gen2:3975.2.2 3975.2.2
```

### The `flatcar` flavor
Expand Down
14 changes: 8 additions & 6 deletions templates/cluster-template-flatcar-sysext.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions templates/flavors/flatcar-sysext/machine-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ spec:
template:
spec:
image:
computeGallery:
gallery: flatcar-23485951-527a-48d6-9d11-6931ff0afc2e
name: flatcar-stable-amd64
marketplace:
version: ${FLATCAR_VERSION}
publisher: kinvolk
offer: flatcar-container-linux-corevm-amd64
sku: stable-gen2
osDisk:
diskSizeGB: 128
osType: Linux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ spec:
template:
spec:
image:
computeGallery:
gallery: flatcar-23485951-527a-48d6-9d11-6931ff0afc2e
name: flatcar-stable-amd64
marketplace:
version: ${FLATCAR_VERSION}
publisher: kinvolk
offer: flatcar-container-linux-corevm-amd64
sku: stable-gen2
14 changes: 8 additions & 6 deletions templates/test/ci/cluster-template-prow-flatcar-sysext.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2ccc908

Please sign in to comment.