From bfa8728362b72af3b9e8b4b9a77230b555767e75 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Wed, 14 Jan 2026 14:08:55 -0800 Subject: [PATCH] add support for RockyLinux driver containers Signed-off-by: Tariq Ibrahim --- controllers/object_controls.go | 6 ++++++ internal/state/nodepool.go | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/controllers/object_controls.go b/controllers/object_controls.go index f811e8568..23b689a7b 100644 --- a/controllers/object_controls.go +++ b/controllers/object_controls.go @@ -694,6 +694,12 @@ func kernelFullVersion(n ClusterPolicyController) (string, string, string) { if !ok { return kFVersion, "", "" } + + if osName == "rocky" { + // If the OS is RockyLinux, we will omit the RockyLinux minor version when constructing the os image tag + osVersion = strings.Split(osVersion, ".")[0] + } + osTag := fmt.Sprintf("%s%s", osName, osVersion) return kFVersion, osTag, osVersion diff --git a/internal/state/nodepool.go b/internal/state/nodepool.go index cd1d68b72..3f27706e0 100644 --- a/internal/state/nodepool.go +++ b/internal/state/nodepool.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "maps" + "strings" corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" @@ -132,5 +133,9 @@ func getNodePools(ctx context.Context, k8sClient client.Client, selector map[str } func (n nodePool) getOS() string { + if n.osRelease == "rocky" { + // If the OS is RockyLinux, we will omit the RockyLinux minor version when constructing the os image tag + n.osVersion = strings.Split(n.osRelease, ".")[0] + } return fmt.Sprintf("%s%s", n.osRelease, n.osVersion) }