From bf8f4a56d41c5ca6410ae69bcbad2872fd939cd1 Mon Sep 17 00:00:00 2001 From: Amos Mastbaum Date: Mon, 10 Aug 2026 15:31:38 +0300 Subject: [PATCH 1/6] feat(tkn): add compute-families param to all AWS Tekton task templates Extends the compute-families param (added in #872 for RHEL and SNC) to the remaining 6 AWS task templates for API consistency. - fedora, rhel-ai: param definition + conditional pass in else branch of compute-sizes check (same pattern as infra-aws-rhel.yaml) - windows-server, mac, eks, kind: param definition only (no-op; these targets do not use the standard compute-request/allocation flow) Regenerated tkn/*.yaml via make tkn-update. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- tkn/infra-aws-eks.yaml | 3 +++ tkn/infra-aws-fedora.yaml | 6 ++++++ tkn/infra-aws-kind.yaml | 3 +++ tkn/infra-aws-mac.yaml | 3 +++ tkn/infra-aws-rhel-ai.yaml | 6 ++++++ tkn/infra-aws-windows-server.yaml | 3 +++ tkn/template/infra-aws-eks.yaml | 3 +++ tkn/template/infra-aws-fedora.yaml | 6 ++++++ tkn/template/infra-aws-kind.yaml | 3 +++ tkn/template/infra-aws-mac.yaml | 3 +++ tkn/template/infra-aws-rhel-ai.yaml | 6 ++++++ tkn/template/infra-aws-windows-server.yaml | 3 +++ 12 files changed, 48 insertions(+) diff --git a/tkn/infra-aws-eks.yaml b/tkn/infra-aws-eks.yaml index edfa2079dc..0050315150 100644 --- a/tkn/infra-aws-eks.yaml +++ b/tkn/infra-aws-eks.yaml @@ -102,6 +102,9 @@ spec: - name: load-balancer-controller description: Install AWS Load Balancer Controller (default false) default: 'false' + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" # Spot params - name: spot diff --git a/tkn/infra-aws-fedora.yaml b/tkn/infra-aws-fedora.yaml index df74f7d55a..374592b144 100644 --- a/tkn/infra-aws-fedora.yaml +++ b/tkn/infra-aws-fedora.yaml @@ -88,6 +88,9 @@ spec: - name: compute-sizes description: Comma seperated list of sizes for the machines to be requested. If set this takes precedence over compute by args default: "" + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" - name: cpus description: Number of CPUs for the cloud instance (default 8) default: "8" @@ -255,6 +258,9 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " + if [[ "$(params.compute-families)" != "" ]]; then + cmd+="--compute-families '$(params.compute-families)' " + fi fi if [[ "$(params.nested-virt)" == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/infra-aws-kind.yaml b/tkn/infra-aws-kind.yaml index c6392eb170..1d72961c23 100644 --- a/tkn/infra-aws-kind.yaml +++ b/tkn/infra-aws-kind.yaml @@ -91,6 +91,9 @@ spec: - name: memory description: Amount of RAM for the cloud instance in GiB (default 64) default: '64' + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" - name: nested-virt description: Use cloud instance that has nested virtualization support default: 'false' diff --git a/tkn/infra-aws-mac.yaml b/tkn/infra-aws-mac.yaml index 9ccabdbaba..d46e9e62d6 100644 --- a/tkn/infra-aws-mac.yaml +++ b/tkn/infra-aws-mac.yaml @@ -99,6 +99,9 @@ spec: - name: fixed-location description: if this flag is set the host will be created only on the region set by the AWS Env (AWS_DEFAULT_REGION). default: 'false' + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" # Topology params - name: airgap diff --git a/tkn/infra-aws-rhel-ai.yaml b/tkn/infra-aws-rhel-ai.yaml index 7843786ea1..8f6d7b90e0 100644 --- a/tkn/infra-aws-rhel-ai.yaml +++ b/tkn/infra-aws-rhel-ai.yaml @@ -100,6 +100,9 @@ spec: - name: compute-sizes description: Comma seperated list of sizes for the machines to be requested. If set this takes precedence over compute by args default: "" + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" - name: cpus description: Number of CPUs for the cloud instance (default 8) default: "8" @@ -283,6 +286,9 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " + if [[ "$(params.compute-families)" != "" ]]; then + cmd+="--compute-families '$(params.compute-families)' " + fi fi if [[ "$(params.nested-virt)" == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/infra-aws-windows-server.yaml b/tkn/infra-aws-windows-server.yaml index 3ceab1faf1..71eddb1aeb 100644 --- a/tkn/infra-aws-windows-server.yaml +++ b/tkn/infra-aws-windows-server.yaml @@ -106,6 +106,9 @@ spec: - name: disk-size description: Disk size in GB for the cloud instance default: '200' + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" - name: airgap description: | diff --git a/tkn/template/infra-aws-eks.yaml b/tkn/template/infra-aws-eks.yaml index e04cdb28ba..1ae0b71d3a 100644 --- a/tkn/template/infra-aws-eks.yaml +++ b/tkn/template/infra-aws-eks.yaml @@ -102,6 +102,9 @@ spec: - name: load-balancer-controller description: Install AWS Load Balancer Controller (default false) default: 'false' + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" # Spot params - name: spot diff --git a/tkn/template/infra-aws-fedora.yaml b/tkn/template/infra-aws-fedora.yaml index 04a4e9e15b..ac6619c753 100644 --- a/tkn/template/infra-aws-fedora.yaml +++ b/tkn/template/infra-aws-fedora.yaml @@ -88,6 +88,9 @@ spec: - name: compute-sizes description: Comma seperated list of sizes for the machines to be requested. If set this takes precedence over compute by args default: "" + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" - name: cpus description: Number of CPUs for the cloud instance (default 8) default: "8" @@ -255,6 +258,9 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " + if [[ "$(params.compute-families)" != "" ]]; then + cmd+="--compute-families '$(params.compute-families)' " + fi fi if [[ "$(params.nested-virt)" == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/template/infra-aws-kind.yaml b/tkn/template/infra-aws-kind.yaml index b1ae58285c..3aed7eccb5 100644 --- a/tkn/template/infra-aws-kind.yaml +++ b/tkn/template/infra-aws-kind.yaml @@ -91,6 +91,9 @@ spec: - name: memory description: Amount of RAM for the cloud instance in GiB (default 64) default: '64' + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" - name: nested-virt description: Use cloud instance that has nested virtualization support default: 'false' diff --git a/tkn/template/infra-aws-mac.yaml b/tkn/template/infra-aws-mac.yaml index 18ab793bc6..92c7811a63 100644 --- a/tkn/template/infra-aws-mac.yaml +++ b/tkn/template/infra-aws-mac.yaml @@ -99,6 +99,9 @@ spec: - name: fixed-location description: if this flag is set the host will be created only on the region set by the AWS Env (AWS_DEFAULT_REGION). default: 'false' + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" # Topology params - name: airgap diff --git a/tkn/template/infra-aws-rhel-ai.yaml b/tkn/template/infra-aws-rhel-ai.yaml index db3b82ff85..5dcdf0f00c 100644 --- a/tkn/template/infra-aws-rhel-ai.yaml +++ b/tkn/template/infra-aws-rhel-ai.yaml @@ -100,6 +100,9 @@ spec: - name: compute-sizes description: Comma seperated list of sizes for the machines to be requested. If set this takes precedence over compute by args default: "" + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" - name: cpus description: Number of CPUs for the cloud instance (default 8) default: "8" @@ -283,6 +286,9 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " + if [[ "$(params.compute-families)" != "" ]]; then + cmd+="--compute-families '$(params.compute-families)' " + fi fi if [[ "$(params.nested-virt)" == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/template/infra-aws-windows-server.yaml b/tkn/template/infra-aws-windows-server.yaml index c1f45b788c..45df6c4c68 100644 --- a/tkn/template/infra-aws-windows-server.yaml +++ b/tkn/template/infra-aws-windows-server.yaml @@ -106,6 +106,9 @@ spec: - name: disk-size description: Disk size in GB for the cloud instance default: '200' + - name: compute-families + description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. + default: "" - name: airgap description: | From df3c8183acc6365555a607f3e5b2d13558237348 Mon Sep 17 00:00:00 2001 From: Amos Mastbaum Date: Mon, 10 Aug 2026 15:39:01 +0300 Subject: [PATCH 2/6] test(tkn): verify compute-families param in all AWS Tekton tasks Two table-driven tests scanning both tkn/ and tkn/template/: - TestComputeFamiliesParamDefined: all 8 infra-aws-* tasks must define the compute-families param - TestComputeFamiliesPassedInScript: rhel, ocp-snc, fedora, rhel-ai must conditionally pass --compute-families in the provisioner script Co-Authored-By: Claude Sonnet 4.6 (1M context) --- pkg/tkn/compute_families_test.go | 69 ++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 pkg/tkn/compute_families_test.go diff --git a/pkg/tkn/compute_families_test.go b/pkg/tkn/compute_families_test.go new file mode 100644 index 0000000000..ead2f9c7dc --- /dev/null +++ b/pkg/tkn/compute_families_test.go @@ -0,0 +1,69 @@ +package tkn + +import ( + "os" + "path/filepath" + "strings" + "testing" +) + +// Tasks that have a compute-sizes conditional in their script and must also +// conditionally pass --compute-families in the else branch. +var tasksWithComputeFamiliesScript = map[string]struct{}{ + "infra-aws-rhel.yaml": {}, + "infra-aws-ocp-snc.yaml": {}, + "infra-aws-fedora.yaml": {}, + "infra-aws-rhel-ai.yaml": {}, +} + +func TestComputeFamiliesParamDefined(t *testing.T) { + root := moduleRoot(t) + for _, dir := range []string{"tkn", filepath.Join("tkn", "template")} { + entries, err := os.ReadDir(filepath.Join(root, dir)) + if err != nil { + t.Fatal(err) + } + for _, entry := range entries { + name := entry.Name() + if !isAWSInfraTask(name) { + continue + } + path := filepath.Join(root, dir, name) + data, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + if !strings.Contains(string(data), "name: compute-families") { + t.Errorf("%s: missing 'compute-families' param definition", path) + } + } + } +} + +func TestComputeFamiliesPassedInScript(t *testing.T) { + root := moduleRoot(t) + for _, dir := range []string{"tkn", filepath.Join("tkn", "template")} { + entries, err := os.ReadDir(filepath.Join(root, dir)) + if err != nil { + t.Fatal(err) + } + for _, entry := range entries { + name := entry.Name() + if _, ok := tasksWithComputeFamiliesScript[name]; !ok { + continue + } + path := filepath.Join(root, dir, name) + data, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + if !strings.Contains(string(data), "--compute-families") { + t.Errorf("%s: missing '--compute-families' flag in script", path) + } + } + } +} + +func isAWSInfraTask(name string) bool { + return strings.HasSuffix(name, ".yaml") && strings.HasPrefix(name, "infra-aws-") +} From 4b768f6d987a335d8fb9a5759038052ca3546c8f Mon Sep 17 00:00:00 2001 From: Amos Mastbaum Date: Mon, 10 Aug 2026 16:54:42 +0300 Subject: [PATCH 3/6] fix(tkn): properly wire compute-families for eks/kind/windows; drop from mac MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - eks, kind, windows: add compute-sizes + cpus/memory params and wire compute-sizes/else conditional in script so --compute-families is actually passed to the CLI (all three targets support the flag) - mac: remove compute-families param — mac uses dedicated host provisioning and the CLI does not accept the flag - Update TestComputeFamiliesParamDefined to skip mac - Add eks, kind, windows to TestComputeFamiliesPassedInScript Co-Authored-By: Claude Sonnet 4.6 (1M context) --- pkg/tkn/compute_families_test.go | 19 +++++++++++++++---- tkn/infra-aws-eks.yaml | 18 ++++++++++++++++++ tkn/infra-aws-kind.yaml | 14 ++++++++++++-- tkn/infra-aws-mac.yaml | 3 --- tkn/infra-aws-windows-server.yaml | 18 ++++++++++++++++++ tkn/template/infra-aws-eks.yaml | 18 ++++++++++++++++++ tkn/template/infra-aws-kind.yaml | 14 ++++++++++++-- tkn/template/infra-aws-mac.yaml | 3 --- tkn/template/infra-aws-windows-server.yaml | 18 ++++++++++++++++++ 9 files changed, 111 insertions(+), 14 deletions(-) diff --git a/pkg/tkn/compute_families_test.go b/pkg/tkn/compute_families_test.go index ead2f9c7dc..7b0c7d620a 100644 --- a/pkg/tkn/compute_families_test.go +++ b/pkg/tkn/compute_families_test.go @@ -10,10 +10,18 @@ import ( // Tasks that have a compute-sizes conditional in their script and must also // conditionally pass --compute-families in the else branch. var tasksWithComputeFamiliesScript = map[string]struct{}{ - "infra-aws-rhel.yaml": {}, - "infra-aws-ocp-snc.yaml": {}, - "infra-aws-fedora.yaml": {}, - "infra-aws-rhel-ai.yaml": {}, + "infra-aws-rhel.yaml": {}, + "infra-aws-ocp-snc.yaml": {}, + "infra-aws-fedora.yaml": {}, + "infra-aws-rhel-ai.yaml": {}, + "infra-aws-eks.yaml": {}, + "infra-aws-kind.yaml": {}, + "infra-aws-windows-server.yaml": {}, +} + +// mac uses dedicated host provisioning — CLI does not accept --compute-families. +var tasksWithoutComputeFamiliesParam = map[string]struct{}{ + "infra-aws-mac.yaml": {}, } func TestComputeFamiliesParamDefined(t *testing.T) { @@ -28,6 +36,9 @@ func TestComputeFamiliesParamDefined(t *testing.T) { if !isAWSInfraTask(name) { continue } + if _, skip := tasksWithoutComputeFamiliesParam[name]; skip { + continue + } path := filepath.Join(root, dir, name) data, err := os.ReadFile(path) if err != nil { diff --git a/tkn/infra-aws-eks.yaml b/tkn/infra-aws-eks.yaml index 0050315150..daf346ac09 100644 --- a/tkn/infra-aws-eks.yaml +++ b/tkn/infra-aws-eks.yaml @@ -102,9 +102,18 @@ spec: - name: load-balancer-controller description: Install AWS Load Balancer Controller (default false) default: 'false' + - name: compute-sizes + description: Comma seperated list of sizes for the machines to be requested. If set this takes precedence over compute by args + default: "" - name: compute-families description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. default: "" + - name: cpus + description: Number of CPUs for the cloud instance (default 8) + default: '8' + - name: memory + description: Amount of RAM for the cloud instance in GiB (default 64) + default: '64' # Spot params - name: spot @@ -219,6 +228,15 @@ spec: cmd+="--conn-details-output /opt/cluster-info " cmd+="--version $(params.k8s-version) " cmd+="--arch $(params.arch) " + if [[ $(params.compute-sizes) != "" ]]; then + cmd+="--compute-sizes $(params.compute-sizes) " + else + cmd+="--cpus $(params.cpus) " + cmd+="--memory $(params.memory) " + if [[ $(params.compute-families) != "" ]]; then + cmd+="--compute-families $(params.compute-families) " + fi + fi cmd+="--workers-desired $(params.workers-desired) " cmd+="--workers-max $(params.workers-max) " cmd+="--workers-min $(params.workers-min) " diff --git a/tkn/infra-aws-kind.yaml b/tkn/infra-aws-kind.yaml index 1d72961c23..61db6af4d5 100644 --- a/tkn/infra-aws-kind.yaml +++ b/tkn/infra-aws-kind.yaml @@ -91,6 +91,9 @@ spec: - name: memory description: Amount of RAM for the cloud instance in GiB (default 64) default: '64' + - name: compute-sizes + description: Comma seperated list of sizes for the machines to be requested. If set this takes precedence over compute by args + default: "" - name: compute-families description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. default: "" @@ -223,8 +226,15 @@ spec: if [[ $(params.operation) == "create" ]]; then cmd+="--conn-details-output /opt/cluster-info " cmd+="--arch $(params.arch) " - cmd+="--cpus $(params.cpus) " - cmd+="--memory $(params.memory) " + if [[ $(params.compute-sizes) != "" ]]; then + cmd+="--compute-sizes $(params.compute-sizes) " + else + cmd+="--cpus $(params.cpus) " + cmd+="--memory $(params.memory) " + if [[ $(params.compute-families) != "" ]]; then + cmd+="--compute-families $(params.compute-families) " + fi + fi if [[ $(params.nested-virt) == "true" ]]; then cmd+="--nested-virt " fi diff --git a/tkn/infra-aws-mac.yaml b/tkn/infra-aws-mac.yaml index d46e9e62d6..9ccabdbaba 100644 --- a/tkn/infra-aws-mac.yaml +++ b/tkn/infra-aws-mac.yaml @@ -99,9 +99,6 @@ spec: - name: fixed-location description: if this flag is set the host will be created only on the region set by the AWS Env (AWS_DEFAULT_REGION). default: 'false' - - name: compute-families - description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. - default: "" # Topology params - name: airgap diff --git a/tkn/infra-aws-windows-server.yaml b/tkn/infra-aws-windows-server.yaml index 71eddb1aeb..5bb04c04f3 100644 --- a/tkn/infra-aws-windows-server.yaml +++ b/tkn/infra-aws-windows-server.yaml @@ -106,9 +106,18 @@ spec: - name: disk-size description: Disk size in GB for the cloud instance default: '200' + - name: compute-sizes + description: Comma seperated list of sizes for the machines to be requested. If set this takes precedence over compute by args + default: "" - name: compute-families description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. default: "" + - name: cpus + description: Number of CPUs for the cloud instance (default 8) + default: '8' + - name: memory + description: Amount of RAM for the cloud instance in GiB (default 64) + default: '200' - name: airgap description: | @@ -237,6 +246,15 @@ spec: cmd+="--ami-owner $(params.ami-owner) " cmd+="--ami-lang $(params.ami-lang) " cmd+="--disk-size $(params.disk-size) " + if [[ $(params.compute-sizes) != "" ]]; then + cmd+="--compute-sizes $(params.compute-sizes) " + else + cmd+="--cpus $(params.cpus) " + cmd+="--memory $(params.memory) " + if [[ $(params.compute-families) != "" ]]; then + cmd+="--compute-families $(params.compute-families) " + fi + fi if [[ $(params.spot) == "true" ]]; then cmd+="--spot --spot-increase-rate $(params.spot-increase-rate) --spot-eviction-tolerance $(params.spot-eviction-tolerance) " fi diff --git a/tkn/template/infra-aws-eks.yaml b/tkn/template/infra-aws-eks.yaml index 1ae0b71d3a..20a41bcd29 100644 --- a/tkn/template/infra-aws-eks.yaml +++ b/tkn/template/infra-aws-eks.yaml @@ -102,9 +102,18 @@ spec: - name: load-balancer-controller description: Install AWS Load Balancer Controller (default false) default: 'false' + - name: compute-sizes + description: Comma seperated list of sizes for the machines to be requested. If set this takes precedence over compute by args + default: "" - name: compute-families description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. default: "" + - name: cpus + description: Number of CPUs for the cloud instance (default 8) + default: '8' + - name: memory + description: Amount of RAM for the cloud instance in GiB (default 64) + default: '64' # Spot params - name: spot @@ -219,6 +228,15 @@ spec: cmd+="--conn-details-output /opt/cluster-info " cmd+="--version $(params.k8s-version) " cmd+="--arch $(params.arch) " + if [[ $(params.compute-sizes) != "" ]]; then + cmd+="--compute-sizes $(params.compute-sizes) " + else + cmd+="--cpus $(params.cpus) " + cmd+="--memory $(params.memory) " + if [[ $(params.compute-families) != "" ]]; then + cmd+="--compute-families $(params.compute-families) " + fi + fi cmd+="--workers-desired $(params.workers-desired) " cmd+="--workers-max $(params.workers-max) " cmd+="--workers-min $(params.workers-min) " diff --git a/tkn/template/infra-aws-kind.yaml b/tkn/template/infra-aws-kind.yaml index 3aed7eccb5..872164d042 100644 --- a/tkn/template/infra-aws-kind.yaml +++ b/tkn/template/infra-aws-kind.yaml @@ -91,6 +91,9 @@ spec: - name: memory description: Amount of RAM for the cloud instance in GiB (default 64) default: '64' + - name: compute-sizes + description: Comma seperated list of sizes for the machines to be requested. If set this takes precedence over compute by args + default: "" - name: compute-families description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. default: "" @@ -223,8 +226,15 @@ spec: if [[ $(params.operation) == "create" ]]; then cmd+="--conn-details-output /opt/cluster-info " cmd+="--arch $(params.arch) " - cmd+="--cpus $(params.cpus) " - cmd+="--memory $(params.memory) " + if [[ $(params.compute-sizes) != "" ]]; then + cmd+="--compute-sizes $(params.compute-sizes) " + else + cmd+="--cpus $(params.cpus) " + cmd+="--memory $(params.memory) " + if [[ $(params.compute-families) != "" ]]; then + cmd+="--compute-families $(params.compute-families) " + fi + fi if [[ $(params.nested-virt) == "true" ]]; then cmd+="--nested-virt " fi diff --git a/tkn/template/infra-aws-mac.yaml b/tkn/template/infra-aws-mac.yaml index 92c7811a63..18ab793bc6 100644 --- a/tkn/template/infra-aws-mac.yaml +++ b/tkn/template/infra-aws-mac.yaml @@ -99,9 +99,6 @@ spec: - name: fixed-location description: if this flag is set the host will be created only on the region set by the AWS Env (AWS_DEFAULT_REGION). default: 'false' - - name: compute-families - description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. - default: "" # Topology params - name: airgap diff --git a/tkn/template/infra-aws-windows-server.yaml b/tkn/template/infra-aws-windows-server.yaml index 45df6c4c68..cec6062cdc 100644 --- a/tkn/template/infra-aws-windows-server.yaml +++ b/tkn/template/infra-aws-windows-server.yaml @@ -106,9 +106,18 @@ spec: - name: disk-size description: Disk size in GB for the cloud instance default: '200' + - name: compute-sizes + description: Comma seperated list of sizes for the machines to be requested. If set this takes precedence over compute by args + default: "" - name: compute-families description: Comma-separated allowlist of AWS instance family prefixes (e.g. m5,m6i,m7i). Empty means no restriction. Only used when compute-sizes is not set. default: "" + - name: cpus + description: Number of CPUs for the cloud instance (default 8) + default: '8' + - name: memory + description: Amount of RAM for the cloud instance in GiB (default 64) + default: '200' - name: airgap description: | @@ -237,6 +246,15 @@ spec: cmd+="--ami-owner $(params.ami-owner) " cmd+="--ami-lang $(params.ami-lang) " cmd+="--disk-size $(params.disk-size) " + if [[ $(params.compute-sizes) != "" ]]; then + cmd+="--compute-sizes $(params.compute-sizes) " + else + cmd+="--cpus $(params.cpus) " + cmd+="--memory $(params.memory) " + if [[ $(params.compute-families) != "" ]]; then + cmd+="--compute-families $(params.compute-families) " + fi + fi if [[ $(params.spot) == "true" ]]; then cmd+="--spot --spot-increase-rate $(params.spot-increase-rate) --spot-eviction-tolerance $(params.spot-eviction-tolerance) " fi From 5c08132669fb3b9914cf05f9cd84d32a6057084d Mon Sep 17 00:00:00 2001 From: Amos Mastbaum Date: Mon, 10 Aug 2026 18:35:22 +0300 Subject: [PATCH 4/6] fix(tkn): correct windows memory param description default value Description said "default 64" but default is 200 GiB (Windows bare metal needs more RAM than standard Linux targets). Co-Authored-By: Claude Sonnet 4.6 (1M context) --- tkn/infra-aws-windows-server.yaml | 2 +- tkn/template/infra-aws-windows-server.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tkn/infra-aws-windows-server.yaml b/tkn/infra-aws-windows-server.yaml index 5bb04c04f3..0c40dc0c15 100644 --- a/tkn/infra-aws-windows-server.yaml +++ b/tkn/infra-aws-windows-server.yaml @@ -116,7 +116,7 @@ spec: description: Number of CPUs for the cloud instance (default 8) default: '8' - name: memory - description: Amount of RAM for the cloud instance in GiB (default 64) + description: Amount of RAM for the cloud instance in GiB (default 200) default: '200' - name: airgap diff --git a/tkn/template/infra-aws-windows-server.yaml b/tkn/template/infra-aws-windows-server.yaml index cec6062cdc..b810213bf8 100644 --- a/tkn/template/infra-aws-windows-server.yaml +++ b/tkn/template/infra-aws-windows-server.yaml @@ -116,7 +116,7 @@ spec: description: Number of CPUs for the cloud instance (default 8) default: '8' - name: memory - description: Amount of RAM for the cloud instance in GiB (default 64) + description: Amount of RAM for the cloud instance in GiB (default 200) default: '200' - name: airgap From 8cd8e357eb0a316a51d0f5b8e1de23436f34a552 Mon Sep 17 00:00:00 2001 From: Amos Mastbaum Date: Mon, 10 Aug 2026 18:37:28 +0300 Subject: [PATCH 5/6] fix(tkn): single-quote param values in compute block for eks/kind/windows Params passed through eval must be single-quoted to prevent shell reinterpretation of special characters. fedora and rhel-ai already used quotes; apply the same pattern to the newly added compute-sizes/families blocks in eks, kind, and windows-server. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- tkn/infra-aws-eks.yaml | 8 ++++---- tkn/infra-aws-kind.yaml | 8 ++++---- tkn/infra-aws-windows-server.yaml | 8 ++++---- tkn/template/infra-aws-eks.yaml | 8 ++++---- tkn/template/infra-aws-kind.yaml | 8 ++++---- tkn/template/infra-aws-windows-server.yaml | 8 ++++---- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tkn/infra-aws-eks.yaml b/tkn/infra-aws-eks.yaml index daf346ac09..7ea0975186 100644 --- a/tkn/infra-aws-eks.yaml +++ b/tkn/infra-aws-eks.yaml @@ -229,12 +229,12 @@ spec: cmd+="--version $(params.k8s-version) " cmd+="--arch $(params.arch) " if [[ $(params.compute-sizes) != "" ]]; then - cmd+="--compute-sizes $(params.compute-sizes) " + cmd+="--compute-sizes '$(params.compute-sizes)' " else - cmd+="--cpus $(params.cpus) " - cmd+="--memory $(params.memory) " + cmd+="--cpus '$(params.cpus)' " + cmd+="--memory '$(params.memory)' " if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families $(params.compute-families) " + cmd+="--compute-families '$(params.compute-families)' " fi fi cmd+="--workers-desired $(params.workers-desired) " diff --git a/tkn/infra-aws-kind.yaml b/tkn/infra-aws-kind.yaml index 61db6af4d5..08451f9e3b 100644 --- a/tkn/infra-aws-kind.yaml +++ b/tkn/infra-aws-kind.yaml @@ -227,12 +227,12 @@ spec: cmd+="--conn-details-output /opt/cluster-info " cmd+="--arch $(params.arch) " if [[ $(params.compute-sizes) != "" ]]; then - cmd+="--compute-sizes $(params.compute-sizes) " + cmd+="--compute-sizes '$(params.compute-sizes)' " else - cmd+="--cpus $(params.cpus) " - cmd+="--memory $(params.memory) " + cmd+="--cpus '$(params.cpus)' " + cmd+="--memory '$(params.memory)' " if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families $(params.compute-families) " + cmd+="--compute-families '$(params.compute-families)' " fi fi if [[ $(params.nested-virt) == "true" ]]; then diff --git a/tkn/infra-aws-windows-server.yaml b/tkn/infra-aws-windows-server.yaml index 0c40dc0c15..35494ff57a 100644 --- a/tkn/infra-aws-windows-server.yaml +++ b/tkn/infra-aws-windows-server.yaml @@ -247,12 +247,12 @@ spec: cmd+="--ami-lang $(params.ami-lang) " cmd+="--disk-size $(params.disk-size) " if [[ $(params.compute-sizes) != "" ]]; then - cmd+="--compute-sizes $(params.compute-sizes) " + cmd+="--compute-sizes '$(params.compute-sizes)' " else - cmd+="--cpus $(params.cpus) " - cmd+="--memory $(params.memory) " + cmd+="--cpus '$(params.cpus)' " + cmd+="--memory '$(params.memory)' " if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families $(params.compute-families) " + cmd+="--compute-families '$(params.compute-families)' " fi fi if [[ $(params.spot) == "true" ]]; then diff --git a/tkn/template/infra-aws-eks.yaml b/tkn/template/infra-aws-eks.yaml index 20a41bcd29..cb2994f7c6 100644 --- a/tkn/template/infra-aws-eks.yaml +++ b/tkn/template/infra-aws-eks.yaml @@ -229,12 +229,12 @@ spec: cmd+="--version $(params.k8s-version) " cmd+="--arch $(params.arch) " if [[ $(params.compute-sizes) != "" ]]; then - cmd+="--compute-sizes $(params.compute-sizes) " + cmd+="--compute-sizes '$(params.compute-sizes)' " else - cmd+="--cpus $(params.cpus) " - cmd+="--memory $(params.memory) " + cmd+="--cpus '$(params.cpus)' " + cmd+="--memory '$(params.memory)' " if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families $(params.compute-families) " + cmd+="--compute-families '$(params.compute-families)' " fi fi cmd+="--workers-desired $(params.workers-desired) " diff --git a/tkn/template/infra-aws-kind.yaml b/tkn/template/infra-aws-kind.yaml index 872164d042..14439aa91a 100644 --- a/tkn/template/infra-aws-kind.yaml +++ b/tkn/template/infra-aws-kind.yaml @@ -227,12 +227,12 @@ spec: cmd+="--conn-details-output /opt/cluster-info " cmd+="--arch $(params.arch) " if [[ $(params.compute-sizes) != "" ]]; then - cmd+="--compute-sizes $(params.compute-sizes) " + cmd+="--compute-sizes '$(params.compute-sizes)' " else - cmd+="--cpus $(params.cpus) " - cmd+="--memory $(params.memory) " + cmd+="--cpus '$(params.cpus)' " + cmd+="--memory '$(params.memory)' " if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families $(params.compute-families) " + cmd+="--compute-families '$(params.compute-families)' " fi fi if [[ $(params.nested-virt) == "true" ]]; then diff --git a/tkn/template/infra-aws-windows-server.yaml b/tkn/template/infra-aws-windows-server.yaml index b810213bf8..182362f0cc 100644 --- a/tkn/template/infra-aws-windows-server.yaml +++ b/tkn/template/infra-aws-windows-server.yaml @@ -247,12 +247,12 @@ spec: cmd+="--ami-lang $(params.ami-lang) " cmd+="--disk-size $(params.disk-size) " if [[ $(params.compute-sizes) != "" ]]; then - cmd+="--compute-sizes $(params.compute-sizes) " + cmd+="--compute-sizes '$(params.compute-sizes)' " else - cmd+="--cpus $(params.cpus) " - cmd+="--memory $(params.memory) " + cmd+="--cpus '$(params.cpus)' " + cmd+="--memory '$(params.memory)' " if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families $(params.compute-families) " + cmd+="--compute-families '$(params.compute-families)' " fi fi if [[ $(params.spot) == "true" ]]; then From 2d24254307fba0cee5a0c096c597d0a672928bbf Mon Sep 17 00:00:00 2001 From: Amos Mastbaum Date: Tue, 11 Aug 2026 07:56:30 +0300 Subject: [PATCH 6/6] fix(tkn): drop redundant empty-check guard on compute-families param MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CLI documents: "Empty means no restriction" — passing --compute-families '' is equivalent to omitting the flag. The if != "" guard was unnecessary and inconsistent with how other optional params (e.g. --gpu-manufacturer) are passed unconditionally. Remove the guard from all 7 affected templates. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- tkn/infra-aws-eks.yaml | 4 +--- tkn/infra-aws-fedora.yaml | 4 +--- tkn/infra-aws-kind.yaml | 4 +--- tkn/infra-aws-ocp-snc.yaml | 4 +--- tkn/infra-aws-rhel-ai.yaml | 4 +--- tkn/infra-aws-rhel.yaml | 4 +--- tkn/infra-aws-windows-server.yaml | 4 +--- tkn/template/infra-aws-eks.yaml | 4 +--- tkn/template/infra-aws-fedora.yaml | 4 +--- tkn/template/infra-aws-kind.yaml | 4 +--- tkn/template/infra-aws-ocp-snc.yaml | 4 +--- tkn/template/infra-aws-rhel-ai.yaml | 4 +--- tkn/template/infra-aws-rhel.yaml | 4 +--- tkn/template/infra-aws-windows-server.yaml | 4 +--- 14 files changed, 14 insertions(+), 42 deletions(-) diff --git a/tkn/infra-aws-eks.yaml b/tkn/infra-aws-eks.yaml index 7ea0975186..ac1845d000 100644 --- a/tkn/infra-aws-eks.yaml +++ b/tkn/infra-aws-eks.yaml @@ -233,9 +233,7 @@ spec: else cmd+="--cpus '$(params.cpus)' " cmd+="--memory '$(params.memory)' " - if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi cmd+="--workers-desired $(params.workers-desired) " cmd+="--workers-max $(params.workers-max) " diff --git a/tkn/infra-aws-fedora.yaml b/tkn/infra-aws-fedora.yaml index 374592b144..61cbc0b052 100644 --- a/tkn/infra-aws-fedora.yaml +++ b/tkn/infra-aws-fedora.yaml @@ -258,9 +258,7 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " - if [[ "$(params.compute-families)" != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ "$(params.nested-virt)" == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/infra-aws-kind.yaml b/tkn/infra-aws-kind.yaml index 08451f9e3b..2d1c87f799 100644 --- a/tkn/infra-aws-kind.yaml +++ b/tkn/infra-aws-kind.yaml @@ -231,9 +231,7 @@ spec: else cmd+="--cpus '$(params.cpus)' " cmd+="--memory '$(params.memory)' " - if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ $(params.nested-virt) == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/infra-aws-ocp-snc.yaml b/tkn/infra-aws-ocp-snc.yaml index c6558eb4ac..0740813677 100644 --- a/tkn/infra-aws-ocp-snc.yaml +++ b/tkn/infra-aws-ocp-snc.yaml @@ -271,9 +271,7 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " - if [[ "$(params.compute-families)" != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ $(params.nested-virt) == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/infra-aws-rhel-ai.yaml b/tkn/infra-aws-rhel-ai.yaml index 8f6d7b90e0..3e4b82de4b 100644 --- a/tkn/infra-aws-rhel-ai.yaml +++ b/tkn/infra-aws-rhel-ai.yaml @@ -286,9 +286,7 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " - if [[ "$(params.compute-families)" != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ "$(params.nested-virt)" == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/infra-aws-rhel.yaml b/tkn/infra-aws-rhel.yaml index 554dfd0432..81e65722ee 100644 --- a/tkn/infra-aws-rhel.yaml +++ b/tkn/infra-aws-rhel.yaml @@ -280,9 +280,7 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " - if [[ "$(params.compute-families)" != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ "$(params.nested-virt)" == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/infra-aws-windows-server.yaml b/tkn/infra-aws-windows-server.yaml index 35494ff57a..5cabb57284 100644 --- a/tkn/infra-aws-windows-server.yaml +++ b/tkn/infra-aws-windows-server.yaml @@ -251,9 +251,7 @@ spec: else cmd+="--cpus '$(params.cpus)' " cmd+="--memory '$(params.memory)' " - if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ $(params.spot) == "true" ]]; then cmd+="--spot --spot-increase-rate $(params.spot-increase-rate) --spot-eviction-tolerance $(params.spot-eviction-tolerance) " diff --git a/tkn/template/infra-aws-eks.yaml b/tkn/template/infra-aws-eks.yaml index cb2994f7c6..4750887036 100644 --- a/tkn/template/infra-aws-eks.yaml +++ b/tkn/template/infra-aws-eks.yaml @@ -233,9 +233,7 @@ spec: else cmd+="--cpus '$(params.cpus)' " cmd+="--memory '$(params.memory)' " - if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi cmd+="--workers-desired $(params.workers-desired) " cmd+="--workers-max $(params.workers-max) " diff --git a/tkn/template/infra-aws-fedora.yaml b/tkn/template/infra-aws-fedora.yaml index ac6619c753..99069347de 100644 --- a/tkn/template/infra-aws-fedora.yaml +++ b/tkn/template/infra-aws-fedora.yaml @@ -258,9 +258,7 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " - if [[ "$(params.compute-families)" != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ "$(params.nested-virt)" == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/template/infra-aws-kind.yaml b/tkn/template/infra-aws-kind.yaml index 14439aa91a..3f4c675277 100644 --- a/tkn/template/infra-aws-kind.yaml +++ b/tkn/template/infra-aws-kind.yaml @@ -231,9 +231,7 @@ spec: else cmd+="--cpus '$(params.cpus)' " cmd+="--memory '$(params.memory)' " - if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ $(params.nested-virt) == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/template/infra-aws-ocp-snc.yaml b/tkn/template/infra-aws-ocp-snc.yaml index 8f61508789..7d44e4c52e 100644 --- a/tkn/template/infra-aws-ocp-snc.yaml +++ b/tkn/template/infra-aws-ocp-snc.yaml @@ -271,9 +271,7 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " - if [[ "$(params.compute-families)" != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ $(params.nested-virt) == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/template/infra-aws-rhel-ai.yaml b/tkn/template/infra-aws-rhel-ai.yaml index 5dcdf0f00c..fb6832992d 100644 --- a/tkn/template/infra-aws-rhel-ai.yaml +++ b/tkn/template/infra-aws-rhel-ai.yaml @@ -286,9 +286,7 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " - if [[ "$(params.compute-families)" != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ "$(params.nested-virt)" == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/template/infra-aws-rhel.yaml b/tkn/template/infra-aws-rhel.yaml index bad149da11..1746c543d0 100644 --- a/tkn/template/infra-aws-rhel.yaml +++ b/tkn/template/infra-aws-rhel.yaml @@ -280,9 +280,7 @@ spec: cmd+="--memory '$(params.memory)' " cmd+="--gpus '$(params.gpus)' " cmd+="--gpu-manufacturer '$(params.gpu-manufacturer)' " - if [[ "$(params.compute-families)" != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ "$(params.nested-virt)" == "true" ]]; then cmd+="--nested-virt " diff --git a/tkn/template/infra-aws-windows-server.yaml b/tkn/template/infra-aws-windows-server.yaml index 182362f0cc..d899c86ce3 100644 --- a/tkn/template/infra-aws-windows-server.yaml +++ b/tkn/template/infra-aws-windows-server.yaml @@ -251,9 +251,7 @@ spec: else cmd+="--cpus '$(params.cpus)' " cmd+="--memory '$(params.memory)' " - if [[ $(params.compute-families) != "" ]]; then - cmd+="--compute-families '$(params.compute-families)' " - fi + cmd+="--compute-families '$(params.compute-families)' " fi if [[ $(params.spot) == "true" ]]; then cmd+="--spot --spot-increase-rate $(params.spot-increase-rate) --spot-eviction-tolerance $(params.spot-eviction-tolerance) "