From b1b32b37c05c8a9a83be4eea1f57cc96cb778de5 Mon Sep 17 00:00:00 2001 From: Kalibh Halford Date: Mon, 19 Jan 2026 11:40:00 +0000 Subject: [PATCH] MAINT: Remove date from image name Removing the date from the image name. If we follow the same naming as our OS images then we can release patches to the images without making the user manually update their clusters. New nodes and replaced nodes will pick up the new image without needing to change the user-values.yaml --- cluster-api/README.md | 10 ++++++---- cluster-api/common_vars.json | 2 +- scripts/README.md | 2 +- scripts/build-all.sh | 6 ------ 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/cluster-api/README.md b/cluster-api/README.md index 4740b98..2e49d6c 100644 --- a/cluster-api/README.md +++ b/cluster-api/README.md @@ -24,8 +24,6 @@ This project contains the current versions of Kubernetes that the Cloud Group wi ansible-playbook prep_builder.yml --ask-become-pass ``` -3. Update the date in the [common_vars.json](./common_vars.json#L12) file for `image_name` - ## Rate Limiting You may run into GitHub rate limiting issues when building images. To avoid this, you can set the following environment variable: @@ -108,12 +106,16 @@ Addtionally, you will need to specify the cloud name in your session by exportin ## Update an image for release 1. Check the image you are working with before you make any changes ```shell - openstack image show + openstack image show ``` 2. Build a cluster with the new image [here](https://stfc.atlassian.net/wiki/spaces/CLOUDKB/pages/211878034/Cluster+API+Setup) and check it builds successfully 3. Set image to public ```shell - openstack image set --public + openstack image set --public + ``` +4. If this is the last supported patch version append `-eol` to the end of the image name + ```shell + openstack image set --name capi-ubuntu-2204-kube-v1.33.4-eol ``` ### Developer Notes diff --git a/cluster-api/common_vars.json b/cluster-api/common_vars.json index 57f5e8c..8881abd 100644 --- a/cluster-api/common_vars.json +++ b/cluster-api/common_vars.json @@ -9,6 +9,6 @@ "image_disk_format": "", "floating_ip_network": "", "goss_inspect_mode": "true", - "image_name": "capi-{{user `build_name`}}-kube-{{user `kubernetes_semver`}}-YYYY-MM-DD", + "image_name": "capi-{{user `build_name`}}-kube-{{user `kubernetes_semver`}}", "image_visibility": "private" } \ No newline at end of file diff --git a/scripts/README.md b/scripts/README.md index 6d4cedf..c92c838 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -15,4 +15,4 @@ # Specify dev or prod OpenStack ./scripts/build-all.sh ``` -3. This will build all new images and upload them to OpenStack in the form `ubuntu-2204-kube- +3. This will build all new images and upload them to OpenStack in the form `capi-ubuntu-2204-kube-` diff --git a/scripts/build-all.sh b/scripts/build-all.sh index 4d18cd7..e3a3a20 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -13,12 +13,6 @@ CUSTOM_ROLE_PATH="${REPO_ROOT}/cluster-api/${env}_vars.json" # Update the image name in vars file to include date COMMON_VARS_PATH="${REPO_ROOT}/cluster-api/common_vars.json" -if grep -E "YYYY-MM-DD" "${COMMON_VARS_PATH}"; then - sed -i -E "s/YYYY-MM-DD/$(date +%F)/" "${COMMON_VARS_PATH}" -else - echo "Date not found in common_vars.json" - exit 1 -fi # ... and make sure Ansible knows where to find on this machine export ANSIBLE_ROLES_PATH="${REPO_ROOT}/os_builders/roles:${REPO_ROOT}/cluster-api/roles"