diff --git a/projects/aws/image-builder/builder/builder.go b/projects/aws/image-builder/builder/builder.go index f55915e081..f2240d8886 100644 --- a/projects/aws/image-builder/builder/builder.go +++ b/projects/aws/image-builder/builder/builder.go @@ -185,6 +185,13 @@ func (b *BuildOptions) BuildImage() { outputArtifactPath = filepath.Join(cwd, fmt.Sprintf("%s.gz", b.Os)) } else if b.Hypervisor == Nutanix { + // Set proxy on RHSM if available + if b.Os == RedHat && b.NutanixConfig.HttpProxy != "" { + if err := setRhsmProxy(&b.NutanixConfig.ProxyConfig, &b.NutanixConfig.RhsmConfig); err != nil { + log.Fatalf("Error parsing proxy host and port for RHSM: %v", err) + } + } + // Patch firmware config for tool upstreamPatchCommand := fmt.Sprintf("make -C %s patch-repo", imageBuilderProjectPath) if err := executeMakeBuildCommand(upstreamPatchCommand, commandEnvVars...); err != nil { @@ -201,7 +208,23 @@ func (b *BuildOptions) BuildImage() { log.Fatalf("Error writing nutanix config file to packer: %v", err) } - buildCommand := fmt.Sprintf("make -C %s local-build-nutanix-ubuntu-%s", imageBuilderProjectPath, b.OsVersion) + var buildCommand string + switch b.Os { + case Ubuntu: + buildCommand = fmt.Sprintf("make -C %s local-build-nutanix-ubuntu-%s", imageBuilderProjectPath, b.OsVersion) + case RedHat: + buildCommand = fmt.Sprintf("make -C %s local-build-nutanix-redhat-%s", imageBuilderProjectPath, b.OsVersion) + commandEnvVars = append(commandEnvVars, + fmt.Sprintf("%s=%s", rhelUsernameEnvVar, b.NutanixConfig.RhelUsername), + fmt.Sprintf("%s=%s", rhelPasswordEnvVar, b.NutanixConfig.RhelPassword), + fmt.Sprintf("%s=%s", rhelImageUrlNutanixEnvVar, b.NutanixConfig.ImageUrl), + ) + } + + if b.NutanixConfig != nil { + commandEnvVars = append(commandEnvVars, fmt.Sprintf("%s=%s", packerNutanixVarFilesEnvVar, packerNutanixConfigFile)) + } + err = executeMakeBuildCommand(buildCommand, commandEnvVars...) if err != nil { log.Fatalf("Error executing image-builder for nutanix hypervisor: %v", err) diff --git a/projects/aws/image-builder/builder/constants.go b/projects/aws/image-builder/builder/constants.go index 75b12c5613..3480d55850 100644 --- a/projects/aws/image-builder/builder/constants.go +++ b/projects/aws/image-builder/builder/constants.go @@ -44,9 +44,11 @@ const ( packerAdditionalFilesConfigFileEnvVar string = "PACKER_ADDITIONAL_FILES_VAR_FILES" rhelUsernameEnvVar string = "RHSM_USERNAME" rhelPasswordEnvVar string = "RHSM_PASSWORD" + rhelImageUrlNutanixEnvVar string = "RHEL_IMAGE_URL" rhsmActivationKeyEnvVar string = "RHSM_ACTIVATION_KEY" rhsmOrgIDEnvVar string = "RHSM_ORG_ID" packerTypeVarFilesEnvVar string = "PACKER_TYPE_VAR_FILES" + packerNutanixVarFilesEnvVar string = "PACKER_NUTANIX_VAR_FILES" eksaUseDevReleaseEnvVar string = "EKSA_USE_DEV_RELEASE" // Miscellaneous diff --git a/projects/aws/image-builder/builder/types.go b/projects/aws/image-builder/builder/types.go index 7f6b13e13d..9f547d5ea0 100644 --- a/projects/aws/image-builder/builder/types.go +++ b/projects/aws/image-builder/builder/types.go @@ -27,6 +27,7 @@ var SupportedUbuntuVersions = []string{ var SupportedRedHatVersions = []string{ "8", + "9", } var SupportedFirmwares = []string{ @@ -108,13 +109,15 @@ type RhelConfig struct { type NutanixConfig struct { ClusterName string `json:"nutanix_cluster_name"` ImageName string `json:"image_name"` - SourceImageName string `json:"source_image_name"` + ImageUrl string `json:"image_url,omitempty"` + SourceImageName string `json:"source_image_name,omitempty"` NutanixEndpoint string `json:"nutanix_endpoint"` NutanixInsecure string `json:"nutanix_insecure"` NutanixPort string `json:"nutanix_port"` NutanixUserName string `json:"nutanix_username"` NutanixPassword string `json:"nutanix_password"` NutanixSubnetName string `json:"nutanix_subnet_name"` + RhelConfig ProxyConfig ExtraPackagesConfig ExtraOverridesConfig diff --git a/projects/aws/image-builder/cmd/build.go b/projects/aws/image-builder/cmd/build.go index 4318986b1b..0010492dab 100644 --- a/projects/aws/image-builder/cmd/build.go +++ b/projects/aws/image-builder/cmd/build.go @@ -87,6 +87,10 @@ func ValidateInputs(bo *builder.BuildOptions) error { bo.OsVersion = "8" } + if bo.Hypervisor != builder.Nutanix && bo.Os == builder.RedHat && bo.OsVersion != "8" { + log.Fatalf("Invalid OS version for RedHat. Please choose 8") + } + if err = validateOSVersion(bo.Os, bo.OsVersion); err != nil { log.Fatal(err.Error()) } @@ -181,6 +185,12 @@ func ValidateInputs(bo *builder.BuildOptions) error { return err } + if bo.Os == builder.RedHat { + if err = validateRedhat(&bo.NutanixConfig.RhelConfig, "Don't check IsoUrl Param"); err != nil { + return err + } + } + if bo.NutanixConfig.NutanixUserName == "" || bo.NutanixConfig.NutanixPassword == "" { log.Fatalf("\"nutanix_username\" and \"nutanix_password\" are required fields in nutanix-config") } @@ -258,10 +268,6 @@ func validateOSHypervisorCombinations(os, hypervisor string) error { return fmt.Errorf("Invalid OS type. Only redhat OS is supported for CloudStack") } - if hypervisor == builder.Nutanix && os != builder.Ubuntu { - return fmt.Errorf("Invalid OS type. Only ubuntu OS is supported for Nutanix") - } - if hypervisor == builder.AMI && os != builder.Ubuntu { return fmt.Errorf("Invalid OS type. Only ubuntu OS is supported for AMI") } diff --git a/projects/aws/image-builder/cmd/build_test.go b/projects/aws/image-builder/cmd/build_test.go index b69744642f..a2b876a318 100644 --- a/projects/aws/image-builder/cmd/build_test.go +++ b/projects/aws/image-builder/cmd/build_test.go @@ -77,7 +77,7 @@ func TestValidateOSHypervisorCombinations(t *testing.T) { Hypervisor: "nutanix", Os: "redhat", }, - wantErr: "Invalid OS type. Only ubuntu OS is supported for Nutanix", + wantErr: "", }, } @@ -138,7 +138,7 @@ func TestValidateOSVersionCombinations(t *testing.T) { Os: "redhat", OsVersion: "9", }, - wantErr: "9 is not a supported version of Redhat. Please select one of 8", + wantErr: "", }, { testName: "Rockylinux 1", diff --git a/projects/kubernetes-sigs/image-builder/Makefile b/projects/kubernetes-sigs/image-builder/Makefile index afe9b61937..fe4e48e91f 100644 --- a/projects/kubernetes-sigs/image-builder/Makefile +++ b/projects/kubernetes-sigs/image-builder/Makefile @@ -40,8 +40,7 @@ PACKER_OVA_VAR_FILES+=$(PACKER_OVA_CONF_FILE) PACKER_RAW_VAR_FILES?= PACKER_CLOUDSTACK_VAR_FILES?= -PACKER_NUTANIX_CONF_FILES=$(MAKE_ROOT)/packer/nutanix/nutanix.json -PACKER_NUTANIX_VAR_FILES+=$(PACKER_NUTANIX_CONF_FILES) +PACKER_NUTANIX_VAR_FILES?=$(MAKE_ROOT)/packer/nutanix/nutanix.json PACKER_TYPE_VAR_FILES?=$(PACKER_$(call TO_UPPER,$(IMAGE_FORMAT))_VAR_FILES) PACKER_ADDITIONAL_FILES_VAR_FILES?= @@ -166,12 +165,12 @@ ALLOWED_OVA_OS=ubuntu bottlerocket redhat ALLOWED_RAW_OS=ubuntu bottlerocket redhat ALLOWED_CLOUDSTACK_OS=redhat ALLOWED_AMI_OS=ubuntu bottlerocket -ALLOWED_NUTANIX_OS=ubuntu +ALLOWED_NUTANIX_OS=ubuntu redhat ALLOWED_UBUNTU_VERSIONS=2004 2204 DEFAULT_UBUNTU_VERSION=2004 -ALLOWED_REDHAT_VERSIONS=8 +ALLOWED_REDHAT_VERSIONS=8 9 DEFAULT_REDHAT_VERSION=8 ALLOWED_BOTTLEROCKET_VERSIONS=1 @@ -433,8 +432,12 @@ release-ami-ubuntu-2204: build-nutanix-ubuntu-2004: build-nutanix-ubuntu-2204: +build-nutanix-redhat-8: +build-nutanix-redhat-9: release-nutanix-ubuntu-2004: release-nutanix-ubuntu-2204: +release-nutanix-redhat-8: +release-nutanix-redhat-9: build-ova-ubuntu-2004: build-ova-ubuntu-2204: diff --git a/projects/kubernetes-sigs/image-builder/patches/0001-Add-goss-validations-for-EKS-D-artifacts.patch b/projects/kubernetes-sigs/image-builder/patches/0001-Add-goss-validations-for-EKS-D-artifacts.patch index 45e3c59020..7d67256491 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0001-Add-goss-validations-for-EKS-D-artifacts.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0001-Add-goss-validations-for-EKS-D-artifacts.patch @@ -1,7 +1,7 @@ -From d63488c1d3e6b4d8754066eda15dadb4c4ab2351 Mon Sep 17 00:00:00 2001 +From 77387af616bd52c47525a2c5c86e430d3e4577e4 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Tue, 11 Jan 2022 18:36:56 -0800 -Subject: [PATCH 01/22] Add goss validations for EKS-D artifacts +Subject: [PATCH 01/25] Add goss validations for EKS-D artifacts Signed-off-by: Vignesh Goutham Ganesh --- @@ -31,5 +31,5 @@ index 0fec04c4e..7bb9293fb 100644 stderr: [] timeout: 0 -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0002-Output-vsphere-builds-to-content-library-instead-of-.patch b/projects/kubernetes-sigs/image-builder/patches/0002-Output-vsphere-builds-to-content-library-instead-of-.patch index cdb4b49e23..690d617e62 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0002-Output-vsphere-builds-to-content-library-instead-of-.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0002-Output-vsphere-builds-to-content-library-instead-of-.patch @@ -1,7 +1,7 @@ -From 36050872c2a7b24d46919788f2c8c50a4bd67c56 Mon Sep 17 00:00:00 2001 +From c1cf6093ad760214200f68f5f826c7d1c8b4f73f Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Tue, 11 Jan 2022 21:00:12 -0800 -Subject: [PATCH 02/22] Output vsphere builds to content library instead of +Subject: [PATCH 02/25] Output vsphere builds to content library instead of exports Signed-off-by: Vignesh Goutham Ganesh @@ -98,5 +98,5 @@ index 64eb272cb..dc308e490 100644 } } -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0003-Create-etc-pki-tls-certs-dir-as-part-of-image-builds.patch b/projects/kubernetes-sigs/image-builder/patches/0003-Create-etc-pki-tls-certs-dir-as-part-of-image-builds.patch index 6d997d3b97..eddf32993b 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0003-Create-etc-pki-tls-certs-dir-as-part-of-image-builds.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0003-Create-etc-pki-tls-certs-dir-as-part-of-image-builds.patch @@ -1,7 +1,7 @@ -From beb55b7c85e2dc93b5f5c0a9c8d68290d48cc9e2 Mon Sep 17 00:00:00 2001 +From f4ba98d94350e21f0b589a61ab1a1b35e74333b3 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Tue, 11 Jan 2022 21:05:13 -0800 -Subject: [PATCH 03/22] Create /etc/pki/tls/certs dir as part of image-builds +Subject: [PATCH 03/25] Create /etc/pki/tls/certs dir as part of image-builds Signed-off-by: Vignesh Goutham Ganesh --- @@ -29,5 +29,5 @@ index 975506921..0aab7f565 100644 file: path: /etc/systemd/system/containerd.service.d/http-proxy.conf -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0004-Add-etcdadm-and-etcd.tar.gz-to-image-for-unstacked-e.patch b/projects/kubernetes-sigs/image-builder/patches/0004-Add-etcdadm-and-etcd.tar.gz-to-image-for-unstacked-e.patch index 58bfa2561b..682362511d 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0004-Add-etcdadm-and-etcd.tar.gz-to-image-for-unstacked-e.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0004-Add-etcdadm-and-etcd.tar.gz-to-image-for-unstacked-e.patch @@ -1,7 +1,7 @@ -From 9f02ccac113f4682bae8d8090c0607014f463b91 Mon Sep 17 00:00:00 2001 +From 6067b53b55e9d381ebd1be1ccc235ce40579ca9c Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Tue, 11 Jan 2022 21:12:53 -0800 -Subject: [PATCH 04/22] Add etcdadm and etcd.tar.gz to image for unstacked etcd +Subject: [PATCH 04/25] Add etcdadm and etcd.tar.gz to image for unstacked etcd support Signed-off-by: Vignesh Goutham Ganesh @@ -83,5 +83,5 @@ index 9cce0a96a..ab5300ccc 100644 "kubernetes_apiserver_port": "6443", "kubernetes_container_registry": "registry.k8s.io", -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0005-Additional-EKS-A-specific-goss-validations.patch b/projects/kubernetes-sigs/image-builder/patches/0005-Additional-EKS-A-specific-goss-validations.patch index a1d83138e8..2d4e83596f 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0005-Additional-EKS-A-specific-goss-validations.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0005-Additional-EKS-A-specific-goss-validations.patch @@ -1,7 +1,7 @@ -From ae159da404950818d798d0f4c19c4ea155fe5c1a Mon Sep 17 00:00:00 2001 +From 73436f46bf8fd6f0251a55c4dd0a2b3b9b691188 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Tue, 11 Jan 2022 21:26:09 -0800 -Subject: [PATCH 05/22] Additional EKS-A specific goss validations +Subject: [PATCH 05/25] Additional EKS-A specific goss validations Signed-off-by: Vignesh Goutham Ganesh --- @@ -128,5 +128,5 @@ index dc308e490..0567fcd56 100644 "version": "{{user `goss_version`}}" } -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0006-Tweak-Product-info-in-OVF.patch b/projects/kubernetes-sigs/image-builder/patches/0006-Tweak-Product-info-in-OVF.patch index fa40975e32..09631159a1 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0006-Tweak-Product-info-in-OVF.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0006-Tweak-Product-info-in-OVF.patch @@ -1,7 +1,7 @@ -From 70613c7b58f1f8760077cd6b61e7a3749c928db2 Mon Sep 17 00:00:00 2001 +From dc5a1d7f5501600e662e509cc21369968698c0dc Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Tue, 11 Jan 2022 21:29:16 -0800 -Subject: [PATCH 06/22] Tweak Product info in OVF +Subject: [PATCH 06/25] Tweak Product info in OVF Signed-off-by: Vignesh Goutham Ganesh --- @@ -35,5 +35,5 @@ index 316427ec3..ca23db5f9 100644 -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0007-Support-crictl-validation-from-input-checksum.patch b/projects/kubernetes-sigs/image-builder/patches/0007-Support-crictl-validation-from-input-checksum.patch index 1a2bb93225..bfc3f876e1 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0007-Support-crictl-validation-from-input-checksum.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0007-Support-crictl-validation-from-input-checksum.patch @@ -1,7 +1,7 @@ -From 839cf56ca4919b662a19bcd1f1ceb251e99a515a Mon Sep 17 00:00:00 2001 +From 649791272ebeeb070f58d4eb096c188507c5c4c7 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Fri, 2 Sep 2022 14:32:21 -0700 -Subject: [PATCH 07/22] Support crictl validation from input checksum +Subject: [PATCH 07/25] Support crictl validation from input checksum Signed-off-by: Vignesh Goutham Ganesh --- @@ -38,5 +38,5 @@ index 9ae4f81b1..1ef16318a 100644 mode: 0600 -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0008-Exclude-kernel-and-cloud-init-from-yum-updates.patch b/projects/kubernetes-sigs/image-builder/patches/0008-Exclude-kernel-and-cloud-init-from-yum-updates.patch index e6af5c9e07..f37ceea018 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0008-Exclude-kernel-and-cloud-init-from-yum-updates.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0008-Exclude-kernel-and-cloud-init-from-yum-updates.patch @@ -1,7 +1,7 @@ -From fdee87538968240c3384e23f50b495912564928e Mon Sep 17 00:00:00 2001 +From 57394707343d15a11f5eaa95e7eecfac27532c1e Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Tue, 6 Dec 2022 15:42:02 -0600 -Subject: [PATCH 08/22] Exclude kernel and cloud-init from yum updates +Subject: [PATCH 08/25] Exclude kernel and cloud-init from yum updates Signed-off-by: Vignesh Goutham Ganesh --- @@ -21,5 +21,5 @@ index 66d9c8cac..0961f37d4 100644 - name: install baseline dependencies -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0009-Patch-cloud-init-systemd-unit-to-wait-for-network-ma.patch b/projects/kubernetes-sigs/image-builder/patches/0009-Patch-cloud-init-systemd-unit-to-wait-for-network-ma.patch index fadfcb47a3..33ff273743 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0009-Patch-cloud-init-systemd-unit-to-wait-for-network-ma.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0009-Patch-cloud-init-systemd-unit-to-wait-for-network-ma.patch @@ -1,7 +1,7 @@ -From 2c48ebfc86fa43c4adb8784b0306ef986cecff93 Mon Sep 17 00:00:00 2001 +From c5d465abe5c4990407b0bb1ae8a5f509dd0e55a1 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Mon, 9 Jan 2023 14:11:18 -0600 -Subject: [PATCH 09/22] Patch cloud-init systemd unit to wait for network +Subject: [PATCH 09/25] Patch cloud-init systemd unit to wait for network manager online Signed-off-by: Vignesh Goutham Ganesh @@ -47,5 +47,5 @@ index 7b1cb93ce..fd93ef4b2 100644 # Enable all cloud-init services on boot. - name: Make sure all cloud init services are enabled -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0010-Add-instance-metadata-options-to-Packer-config.patch b/projects/kubernetes-sigs/image-builder/patches/0010-Add-instance-metadata-options-to-Packer-config.patch index c67fd49f5c..4cb7e109c9 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0010-Add-instance-metadata-options-to-Packer-config.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0010-Add-instance-metadata-options-to-Packer-config.patch @@ -1,7 +1,7 @@ -From 7d1bd7af0d8df722156ecabc3829e74985f2baf5 Mon Sep 17 00:00:00 2001 +From 3b894353bd052b36d4fc6afe61888ddd4eba67e2 Mon Sep 17 00:00:00 2001 From: Abhay Krishna Arunachalam Date: Thu, 2 Feb 2023 01:39:15 -0800 -Subject: [PATCH 10/22] Add instance metadata options to Packer config +Subject: [PATCH 10/25] Add instance metadata options to Packer config Signed-off-by: Abhay Krishna Arunachalam --- @@ -35,5 +35,5 @@ index 3117354cd..175ca11d6 100644 "ib_version": "{{env `IB_VERSION`}}", "iops": "3000", -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0011-Rename-Snow-node-image-to-reflect-appropriate-CAPI-p.patch b/projects/kubernetes-sigs/image-builder/patches/0011-Rename-Snow-node-image-to-reflect-appropriate-CAPI-p.patch index 97472999e3..f01a5f1676 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0011-Rename-Snow-node-image-to-reflect-appropriate-CAPI-p.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0011-Rename-Snow-node-image-to-reflect-appropriate-CAPI-p.patch @@ -1,7 +1,7 @@ -From 03a34c9a1742e681a117a23c271bfeee40a1ce59 Mon Sep 17 00:00:00 2001 +From 174958df5393fe070de05dc38480195a835f14eb Mon Sep 17 00:00:00 2001 From: Abhay Krishna Arunachalam Date: Fri, 10 Feb 2023 16:08:18 -0800 -Subject: [PATCH 11/22] Rename Snow node image to reflect appropriate CAPI +Subject: [PATCH 11/25] Rename Snow node image to reflect appropriate CAPI provider Signed-off-by: Abhay Krishna Arunachalam @@ -23,5 +23,5 @@ index 175ca11d6..cb6fbb470 100644 "ami_regions": "{{user `ami_regions`}}", "ami_users": "{{user `ami_users`}}", -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0012-Add-EKS-A-specific-inline-Goss-vars-to-all-supported.patch b/projects/kubernetes-sigs/image-builder/patches/0012-Add-EKS-A-specific-inline-Goss-vars-to-all-supported.patch index 4554360b8d..b58677f124 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0012-Add-EKS-A-specific-inline-Goss-vars-to-all-supported.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0012-Add-EKS-A-specific-inline-Goss-vars-to-all-supported.patch @@ -1,7 +1,7 @@ -From 1c18f29813aea77c65d5891941d2b23055048a9c Mon Sep 17 00:00:00 2001 +From 2d18d5c4c61cf2415e378a80675eca795de73db5 Mon Sep 17 00:00:00 2001 From: Abhay Krishna Arunachalam Date: Thu, 2 Mar 2023 19:27:50 -0800 -Subject: [PATCH 12/22] Add EKS-A specific inline Goss vars to all supported +Subject: [PATCH 12/25] Add EKS-A specific inline Goss vars to all supported providers Signed-off-by: Abhay Krishna Arunachalam @@ -85,5 +85,5 @@ index 152041455..a04be4e8f 100644 "version": "{{user `goss_version`}}" } -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0013-Use-tar.gz-extension-for-CNI-plugins-tarball.patch b/projects/kubernetes-sigs/image-builder/patches/0013-Use-tar.gz-extension-for-CNI-plugins-tarball.patch index 97d50c3e8b..49a7c523a2 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0013-Use-tar.gz-extension-for-CNI-plugins-tarball.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0013-Use-tar.gz-extension-for-CNI-plugins-tarball.patch @@ -1,7 +1,7 @@ -From efa4c0fb7f8e676f38f35bd6b497274fb0d17eae Mon Sep 17 00:00:00 2001 +From d1e8e6db38ae280f966ccfca2cae39111ed34868 Mon Sep 17 00:00:00 2001 From: Abhay Krishna Arunachalam Date: Thu, 9 Mar 2023 16:05:22 -0800 -Subject: [PATCH 13/22] Use tar.gz extension for CNI plugins tarball +Subject: [PATCH 13/25] Use tar.gz extension for CNI plugins tarball Signed-off-by: Abhay Krishna Arunachalam --- @@ -22,5 +22,5 @@ index 48a4a2177..99bf2f843 100644 dest: /tmp/cni.tar.gz mode: 0755 -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0014-uses-latest-ubuntu-22.04-iso.patch b/projects/kubernetes-sigs/image-builder/patches/0014-uses-latest-ubuntu-22.04-iso.patch index 2d2b5f0cd9..9801a5e9c0 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0014-uses-latest-ubuntu-22.04-iso.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0014-uses-latest-ubuntu-22.04-iso.patch @@ -1,7 +1,7 @@ -From 9f737d8f55108302eac322f93068f3c998b509f6 Mon Sep 17 00:00:00 2001 +From 5f40679680c03ba0e28613ab48bce4e329db3c79 Mon Sep 17 00:00:00 2001 From: Jackson West Date: Fri, 23 Jun 2023 10:50:08 -0500 -Subject: [PATCH 14/22] uses latest ubuntu 22.04 iso +Subject: [PATCH 14/25] uses latest ubuntu 22.04 iso --- images/capi/packer/ova/ubuntu-2204-efi.json | 4 ++-- @@ -41,5 +41,5 @@ index badbf1045..38efb01c8 100644 "shutdown_command": "shutdown -P now", "vsphere_guest_os_type": "ubuntu64Guest" -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0015-adds-support-for-raw-ubuntu-22.04-builds.patch b/projects/kubernetes-sigs/image-builder/patches/0015-adds-support-for-raw-ubuntu-22.04-builds.patch index a03858f36b..0406fdda35 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0015-adds-support-for-raw-ubuntu-22.04-builds.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0015-adds-support-for-raw-ubuntu-22.04-builds.patch @@ -1,7 +1,7 @@ -From 4bde5df4762a2afb6c74f7df3c7b05489e65b995 Mon Sep 17 00:00:00 2001 +From 515ed374314c8bad6b49719666c6efbad64bb954 Mon Sep 17 00:00:00 2001 From: Jackson West Date: Fri, 16 Jun 2023 15:27:15 -0500 -Subject: [PATCH 15/22] adds support for raw ubuntu 22.04 builds +Subject: [PATCH 15/25] adds support for raw ubuntu 22.04 builds --- images/capi/Makefile | 6 +- @@ -311,5 +311,5 @@ index 000000000..e03f336cd + "shutdown_command": "shutdown -P now" + } -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0016-sets-OS_VERSION-for-goss-validation-on-raw-image-bui.patch b/projects/kubernetes-sigs/image-builder/patches/0016-sets-OS_VERSION-for-goss-validation-on-raw-image-bui.patch index 8a30914cce..e6d9478618 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0016-sets-OS_VERSION-for-goss-validation-on-raw-image-bui.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0016-sets-OS_VERSION-for-goss-validation-on-raw-image-bui.patch @@ -1,7 +1,7 @@ -From 17f597b2b0eb3160ff212b407685ee33bcf41d55 Mon Sep 17 00:00:00 2001 +From e0d2002ce4c1a8a85f9f000af601bec976180402 Mon Sep 17 00:00:00 2001 From: Jackson West Date: Wed, 28 Jun 2023 12:42:22 -0500 -Subject: [PATCH 16/22] sets OS_VERSION for goss validation on raw image builds +Subject: [PATCH 16/25] sets OS_VERSION for goss validation on raw image builds --- images/capi/packer/raw/packer.json | 1 + @@ -72,5 +72,5 @@ index e03f336cd..c9cfe7381 100644 "iso_checksum": "5e38b55d57d94ff029719342357325ed3bda38fa80054f9330dc789cd2d43931", "iso_checksum_type": "sha256", -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0017-Disable-UDP-offload-service-for-Redhat-and-Ubuntu.patch b/projects/kubernetes-sigs/image-builder/patches/0017-Disable-UDP-offload-service-for-Redhat-and-Ubuntu.patch index e1b80468bd..abbe825866 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0017-Disable-UDP-offload-service-for-Redhat-and-Ubuntu.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0017-Disable-UDP-offload-service-for-Redhat-and-Ubuntu.patch @@ -1,7 +1,7 @@ -From 912c3a6d2da26b78ab1ca01c2cf5890ee808ada8 Mon Sep 17 00:00:00 2001 +From 0c89186ab29acab4cb2a29bb1703659d2f024383 Mon Sep 17 00:00:00 2001 From: Taylor Neyland Date: Wed, 19 Jul 2023 12:51:30 -0500 -Subject: [PATCH 17/22] Disable UDP offload service for Redhat and Ubuntu +Subject: [PATCH 17/25] Disable UDP offload service for Redhat and Ubuntu --- .../system/disable-udp-offload-redhat.service | 15 +++++++++++++++ @@ -108,5 +108,5 @@ index 8a63b50ce..392a6fc4e 100644 + state: stopped + when: ansible_distribution_version is version('22.04', '>=') -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0018-Add-dracut-cmd-to-generate-initramfs-with-all-driver.patch b/projects/kubernetes-sigs/image-builder/patches/0018-Add-dracut-cmd-to-generate-initramfs-with-all-driver.patch index 897696b23e..c286ee97d9 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0018-Add-dracut-cmd-to-generate-initramfs-with-all-driver.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0018-Add-dracut-cmd-to-generate-initramfs-with-all-driver.patch @@ -1,7 +1,7 @@ -From e0731461811d452da17f85710948b5f4b494ff7e Mon Sep 17 00:00:00 2001 +From fbd4f5a4bc97e78a65ac5464927275c5ea2ead2f Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Wed, 6 Sep 2023 11:09:02 -0500 -Subject: [PATCH 18/22] Add dracut cmd to generate initramfs with all drivers +Subject: [PATCH 18/25] Add dracut cmd to generate initramfs with all drivers for rhel raw Signed-off-by: Vignesh Goutham Ganesh @@ -38,5 +38,5 @@ index 54a7c0d80..e1f1735c7 100644 "distro_version": "8", "epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8", -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0019-Add-proxy-register-with-satellite-and-pull-packages-.patch b/projects/kubernetes-sigs/image-builder/patches/0019-Add-proxy-register-with-satellite-and-pull-packages-.patch index 9497c25826..42c3a5d371 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0019-Add-proxy-register-with-satellite-and-pull-packages-.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0019-Add-proxy-register-with-satellite-and-pull-packages-.patch @@ -1,7 +1,7 @@ -From 23ffb2ba7d50eacf6e59cd59b2f6c12d59ac84d1 Mon Sep 17 00:00:00 2001 +From 4e1086adafdb2b6b8462b0da2b18cc9b926e7ec0 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Fri, 11 Aug 2023 11:59:20 -0500 -Subject: [PATCH 19/22] Add proxy, register with satellite, and pull packages +Subject: [PATCH 19/25] Add proxy, register with satellite, and pull packages from satellite support to redhat subscription manager When pulling from satellite the os version must be set using `rhsm_server_release_version` @@ -103,5 +103,5 @@ index 4176c8ff9..a9b90e83c 100644 "ansible_scp_extra_args": "{{env `ANSIBLE_SCP_EXTRA_ARGS`}}" } -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0020-Ubuntu-switch-to-offline-install-when-mirrors-are-un.patch b/projects/kubernetes-sigs/image-builder/patches/0020-Ubuntu-switch-to-offline-install-when-mirrors-are-un.patch index 14fe1ea258..31279815f0 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0020-Ubuntu-switch-to-offline-install-when-mirrors-are-un.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0020-Ubuntu-switch-to-offline-install-when-mirrors-are-un.patch @@ -1,7 +1,7 @@ -From 27ed7edc98b71beaeb0970d348fa1553591a9a46 Mon Sep 17 00:00:00 2001 +From e5a649ccfc3d497a24c15db8db8c878daef2ddb4 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Mon, 18 Sep 2023 10:38:42 -0500 -Subject: [PATCH 20/22] Ubuntu switch to offline-install when mirrors are +Subject: [PATCH 20/25] Ubuntu switch to offline-install when mirrors are unavailable Signed-off-by: Vignesh Goutham Ganesh @@ -37,5 +37,5 @@ index e2838e3c4..a5ed32346 100644 ssh: install-server: true -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0021-Default-Flatcar-version-to-avoid-pulling-from-intern.patch b/projects/kubernetes-sigs/image-builder/patches/0021-Default-Flatcar-version-to-avoid-pulling-from-intern.patch index cbdecba697..910ee6a415 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0021-Default-Flatcar-version-to-avoid-pulling-from-intern.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0021-Default-Flatcar-version-to-avoid-pulling-from-intern.patch @@ -1,7 +1,7 @@ -From 9bf8214d2cd7274db5a1b8a2568aa7f4a2b5e850 Mon Sep 17 00:00:00 2001 +From f815a68696ad4269f4da042aa5fe0843f1636095 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Wed, 20 Sep 2023 10:33:44 -0500 -Subject: [PATCH 21/22] Default Flatcar version to avoid pulling from internet +Subject: [PATCH 21/25] Default Flatcar version to avoid pulling from internet on every make Signed-off-by: Vignesh Goutham Ganesh @@ -23,5 +23,5 @@ index f841eac48..905407368 100644 override FLATCAR_VERSION := $(shell hack/image-grok-latest-flatcar-version.sh $(FLATCAR_CHANNEL)) endif -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0022-TEMP-skip-python-3.9-check-if-ansible-already-instal.patch b/projects/kubernetes-sigs/image-builder/patches/0022-TEMP-skip-python-3.9-check-if-ansible-already-instal.patch index e313f3fe97..f289eeb975 100644 --- a/projects/kubernetes-sigs/image-builder/patches/0022-TEMP-skip-python-3.9-check-if-ansible-already-instal.patch +++ b/projects/kubernetes-sigs/image-builder/patches/0022-TEMP-skip-python-3.9-check-if-ansible-already-instal.patch @@ -1,7 +1,8 @@ -From dc93519735126fd6bf1b7ef13992dcab865d811b Mon Sep 17 00:00:00 2001 +From 18d7a763c7f856e52c6080fffa23c32eac609e76 Mon Sep 17 00:00:00 2001 From: Prow Bot Date: Fri, 13 Oct 2023 13:11:34 -0500 -Subject: [PATCH 21/22] TEMP: skip python 3.9 check if ansible already installed +Subject: [PATCH 22/25] TEMP: skip python 3.9 check if ansible already + installed --- images/capi/hack/ensure-python.sh | 11 ++++++++--- @@ -28,5 +29,5 @@ index f8833d54e..b3c3e670b 100755 +fi python3 --version -- -2.40.1 +2.39.2 diff --git a/projects/kubernetes-sigs/image-builder/patches/0023-Nutanix-RHEL-support-for-AWS-image-builder.patch b/projects/kubernetes-sigs/image-builder/patches/0023-Nutanix-RHEL-support-for-AWS-image-builder.patch new file mode 100644 index 0000000000..9f6428bc0b --- /dev/null +++ b/projects/kubernetes-sigs/image-builder/patches/0023-Nutanix-RHEL-support-for-AWS-image-builder.patch @@ -0,0 +1,50 @@ +From c6c3d38b240d23520a69760ce740b8f479920e5a Mon Sep 17 00:00:00 2001 +From: Ilya Alekseyev +Date: Wed, 11 Oct 2023 22:07:22 -0400 +Subject: [PATCH 23/25] Nutanix RHEL support for AWS image-builder + +--- + images/capi/packer/nutanix/packer.json | 1 + + images/capi/packer/nutanix/rhel-8.json | 1 - + images/capi/packer/nutanix/rhel-9.json | 1 - + 3 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/images/capi/packer/nutanix/packer.json b/images/capi/packer/nutanix/packer.json +index a4b752397..da71754d8 100644 +--- a/images/capi/packer/nutanix/packer.json ++++ b/images/capi/packer/nutanix/packer.json +@@ -130,6 +130,7 @@ + "image_delete": "false", + "image_export": "false", + "image_name": "{{user `build_name`}}-kube-{{user `kubernetes_semver`}}", ++ "image_url": "{{env `RHEL_IMAGE_URL`}}", + "kubernetes_cni_deb_version": null, + "kubernetes_cni_http_source": null, + "kubernetes_cni_semver": null, +diff --git a/images/capi/packer/nutanix/rhel-8.json b/images/capi/packer/nutanix/rhel-8.json +index 9aba21d66..b2bef7674 100644 +--- a/images/capi/packer/nutanix/rhel-8.json ++++ b/images/capi/packer/nutanix/rhel-8.json +@@ -5,7 +5,6 @@ + "epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8", + "extra_rpms": "", + "guest_os_type": "Linux", +- "image_url": "https://REPLACE_YOUR_SERVER/redhat/8/rhel-8.8-x86_64-kvm.qcow2", + "redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm", + "shutdown_command": "shutdown -P now", + "user_data": "I2Nsb3VkLWNvbmZpZwp1c2VyczoKICAtIG5hbWU6IGJ1aWxkZXIKICAgIHN1ZG86IFsnQUxMPShBTEwpIE5PUEFTU1dEOkFMTCddCmNocGFzc3dkOgogIGxpc3Q6IHwKICAgIGJ1aWxkZXI6YnVpbGRlcgogIGV4cGlyZTogRmFsc2UKc3NoX3B3YXV0aDogVHJ1ZQ==" +diff --git a/images/capi/packer/nutanix/rhel-9.json b/images/capi/packer/nutanix/rhel-9.json +index b7dddb4f2..921a9729f 100644 +--- a/images/capi/packer/nutanix/rhel-9.json ++++ b/images/capi/packer/nutanix/rhel-9.json +@@ -5,7 +5,6 @@ + "epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9", + "extra_rpms": "", + "guest_os_type": "Linux", +- "image_url": "https://REPLACE_YOUR_SERVER/redhat/9/rhel-9.2-x86_64-kvm.qcow2", + "redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm", + "shutdown_command": "shutdown -P now", + "user_data": "I2Nsb3VkLWNvbmZpZwp1c2VyczoKICAtIG5hbWU6IGJ1aWxkZXIKICAgIHN1ZG86IFsnQUxMPShBTEwpIE5PUEFTU1dEOkFMTCddCmNocGFzc3dkOgogIGxpc3Q6IHwKICAgIGJ1aWxkZXI6YnVpbGRlcgogIGV4cGlyZTogRmFsc2UKc3NoX3B3YXV0aDogVHJ1ZQ==" +-- +2.39.2 + diff --git a/projects/kubernetes-sigs/image-builder/patches/0024-Fix-redhat-9-cloud-init-feature-flags-bug.patch b/projects/kubernetes-sigs/image-builder/patches/0024-Fix-redhat-9-cloud-init-feature-flags-bug.patch new file mode 100644 index 0000000000..7c730cf3df --- /dev/null +++ b/projects/kubernetes-sigs/image-builder/patches/0024-Fix-redhat-9-cloud-init-feature-flags-bug.patch @@ -0,0 +1,42 @@ +From ac7f6a843dc531ee813346ff66aa9b53164e3cb0 Mon Sep 17 00:00:00 2001 +From: Ilya Alekseyev +Date: Thu, 12 Oct 2023 09:12:01 -0400 +Subject: [PATCH 24/25] Fix redhat 9 cloud-init feature flags bug + +--- + images/capi/ansible/roles/providers/tasks/main.yml | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/images/capi/ansible/roles/providers/tasks/main.yml b/images/capi/ansible/roles/providers/tasks/main.yml +index fd93ef4b2..ea0150391 100644 +--- a/images/capi/ansible/roles/providers/tasks/main.yml ++++ b/images/capi/ansible/roles/providers/tasks/main.yml +@@ -132,14 +132,23 @@ + mode: 0644 + when: ansible_os_family == "Debian" + +-- name: set cloudinit feature flags for redhat ++- name: set cloudinit feature flags for redhat 8 + copy: + src: usr/lib/python3/site-packages/cloudinit/feature_overrides.py + dest: /usr/lib/python3.6/site-packages/cloudinit/feature_overrides.py + owner: root + group: root + mode: 0644 +- when: ansible_os_family == "RedHat" and ansible_distribution == "RedHat" ++ when: ansible_os_family == "RedHat" and ansible_distribution == "RedHat" and ansible_distribution_major_version == "8" ++ ++- name: set cloudinit feature flags for redhat 9 ++ copy: ++ src: usr/lib/python3/site-packages/cloudinit/feature_overrides.py ++ dest: /usr/lib/python3.9/site-packages/cloudinit/feature_overrides.py ++ owner: root ++ group: root ++ mode: 0644 ++ when: ansible_os_family == "RedHat" and ansible_distribution == "RedHat" and ansible_distribution_major_version == "9" + + - name: Ensure chrony is running + systemd: +-- +2.39.2 + diff --git a/projects/kubernetes-sigs/image-builder/patches/0025-Fix-ensure-iptables-present-for-rhel.patch b/projects/kubernetes-sigs/image-builder/patches/0025-Fix-ensure-iptables-present-for-rhel.patch new file mode 100644 index 0000000000..e68f94d798 --- /dev/null +++ b/projects/kubernetes-sigs/image-builder/patches/0025-Fix-ensure-iptables-present-for-rhel.patch @@ -0,0 +1,34 @@ +From 442ef46609a5ae6d518a5bef9d02568993e05994 Mon Sep 17 00:00:00 2001 +From: Ilya Alekseyev +Date: Fri, 13 Oct 2023 12:20:42 -0400 +Subject: [PATCH 25/25] Fix ensure iptables present for rhel + +--- + images/capi/ansible/roles/setup/tasks/redhat.yml | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/images/capi/ansible/roles/setup/tasks/redhat.yml b/images/capi/ansible/roles/setup/tasks/redhat.yml +index 345aeaa33..a4bc9d03d 100644 +--- a/images/capi/ansible/roles/setup/tasks/redhat.yml ++++ b/images/capi/ansible/roles/setup/tasks/redhat.yml +@@ -124,3 +124,17 @@ + name: "{{ extra_rpms.split() }}" + state: present + lock_timeout: 60 ++ ++- name: ensure iptables present for redhat 8 ++ yum: ++ name: "iptables" ++ state: present ++ lock_timeout: 60 ++ when: ansible_os_family == "RedHat" and ansible_distribution == "RedHat" and ansible_distribution_major_version == "8" ++ ++- name: ensure iptables present for redhat 9 ++ yum: ++ name: "iptables-nft" ++ state: present ++ lock_timeout: 60 ++ when: ansible_os_family == "RedHat" and ansible_distribution == "RedHat" and ansible_distribution_major_version == "9" +-- +2.39.2 +