Skip to content

Commit 879dd47

Browse files
Always download Nutanix source images and delete them after build (#4121)
1 parent f1da110 commit 879dd47

10 files changed

+24
-14
lines changed

projects/aws/image-builder/builder/types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ type NutanixConfig struct {
119119
ImageName string `json:"image_name"`
120120
ImageUrl string `json:"image_url,omitempty"`
121121
ImageExport string `json:"image_export,omitempty"`
122-
SourceImageName string `json:"source_image_name,omitempty"`
123122
NutanixEndpoint string `json:"nutanix_endpoint"`
124123
NutanixInsecure string `json:"nutanix_insecure"`
125124
NutanixPort string `json:"nutanix_port"`

projects/kubernetes-sigs/image-builder/patches/0005-RHEL-support-and-improvements.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 9d99446c06654487aed896f4a4554dbdf4dc9c86 Mon Sep 17 00:00:00 2001
1+
From a21b747bec93b12163136887703cd1d9b0adaaf7 Mon Sep 17 00:00:00 2001
22
From: Vignesh Goutham Ganesh <[email protected]>
33
Date: Tue, 6 Dec 2022 15:42:02 -0600
44
Subject: [PATCH 05/13] RHEL support and improvements

projects/kubernetes-sigs/image-builder/patches/0006-Nutanix-improvements.patch

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
From b55783834e2acd76561a447d365890510a2707c3 Mon Sep 17 00:00:00 2001
1+
From 2afd159589243181289bbb8ca0b524450a385e4a Mon Sep 17 00:00:00 2001
22
From: Ilya Alekseyev <[email protected]>
33
Date: Wed, 11 Oct 2023 22:07:22 -0400
44
Subject: [PATCH 06/13] Nutanix improvements
55

66
- Fetch Nutanix RHEL source image URL from environment
77
- Force-delete Nutanix builder VMs on failure
8-
8+
- Always download Nutanix source images and delete them after build
99
Signed-off-by: Vignesh Goutham Ganesh <[email protected]>
1010
---
1111
images/capi/packer/nutanix/.gitignore | 2 +-
12-
images/capi/packer/nutanix/packer.json.tmpl | 1 +
12+
images/capi/packer/nutanix/packer.json.tmpl | 5 +++--
1313
images/capi/packer/nutanix/rhel-8.json | 1 -
1414
images/capi/packer/nutanix/rhel-9.json | 1 -
15-
4 files changed, 2 insertions(+), 3 deletions(-)
15+
4 files changed, 4 insertions(+), 5 deletions(-)
1616

1717
diff --git a/images/capi/packer/nutanix/.gitignore b/images/capi/packer/nutanix/.gitignore
1818
index f5f595899..b39358b5e 100644
@@ -23,7 +23,7 @@ index f5f595899..b39358b5e 100644
2323
-user-data.tmpl
2424
+user-data
2525
diff --git a/images/capi/packer/nutanix/packer.json.tmpl b/images/capi/packer/nutanix/packer.json.tmpl
26-
index f53c51514..c5e150dbd 100644
26+
index f53c51514..3d4e875b0 100644
2727
--- a/images/capi/packer/nutanix/packer.json.tmpl
2828
+++ b/images/capi/packer/nutanix/packer.json.tmpl
2929
@@ -132,6 +132,7 @@
@@ -34,6 +34,17 @@ index f53c51514..c5e150dbd 100644
3434
"kubernetes_cni_deb_version": null,
3535
"kubernetes_cni_http_source": null,
3636
"kubernetes_cni_semver": null,
37+
@@ -160,8 +161,8 @@
38+
"nutanix_username": "{{env `NUTANIX_USERNAME`}}",
39+
"python_path": "",
40+
"scp_extra_vars": "",
41+
- "source_image_delete": "false",
42+
- "source_image_force": "false",
43+
+ "source_image_delete": "true",
44+
+ "source_image_force": "true",
45+
"ssh_password": "$SSH_PASSWORD",
46+
"ssh_username": "builder",
47+
"vm_force_delete": "true"
3748
diff --git a/images/capi/packer/nutanix/rhel-8.json b/images/capi/packer/nutanix/rhel-8.json
3849
index 9aba21d66..b2bef7674 100644
3950
--- a/images/capi/packer/nutanix/rhel-8.json

projects/kubernetes-sigs/image-builder/patches/0007-adds-retries-and-timeout-to-packer-image-builder.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 445b9af6daf52ad00e3a4a781b16c2d86f86ff6d Mon Sep 17 00:00:00 2001
1+
From ed4ddcbe24b243fba1240c45666d5d509d5cd900 Mon Sep 17 00:00:00 2001
22
From: Vignesh Goutham Ganesh <[email protected]>
33
Date: Mon, 21 Aug 2023 18:40:07 -0500
44
Subject: [PATCH 07/13] adds retries and timeout to packer image-builder

projects/kubernetes-sigs/image-builder/patches/0008-Networking-improvements.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 57a15c0b40a236b15234264dab8968445e65156d Mon Sep 17 00:00:00 2001
1+
From ef513c911f062f11c0a4a899fccaaba9aa36ad57 Mon Sep 17 00:00:00 2001
22
From: Taylor Neyland <[email protected]>
33
Date: Wed, 19 Jul 2023 12:51:30 -0500
44
Subject: [PATCH 08/13] Networking improvements

projects/kubernetes-sigs/image-builder/patches/0009-Support-and-improvements-for-RHEL-9-EFI.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 4091348b5187ca6108dc8a36bb7a2cb178d43be5 Mon Sep 17 00:00:00 2001
1+
From 71c142521d1831bc054be32ae0d36e2f8e43c35b Mon Sep 17 00:00:00 2001
22
From: Shizhao Liu <[email protected]>
33
Date: Mon, 19 Aug 2024 10:14:26 -0700
44
Subject: [PATCH 09/13] Support and improvements for RHEL 9 EFI

projects/kubernetes-sigs/image-builder/patches/0010-Pin-Packer-Goss-plugin-version-to-3.1.4.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From d4e9c247a20de87ee5b9e2d16ffd73b1b20c3c59 Mon Sep 17 00:00:00 2001
1+
From ec02c52ae5b968f6187e4cd9fa7697b9aede1c4d Mon Sep 17 00:00:00 2001
22
From: Abhay Krishna Arunachalam <[email protected]>
33
Date: Thu, 19 Sep 2024 15:36:00 -0700
44
Subject: [PATCH 10/13] Pin Packer Goss plugin version to 3.1.4

projects/kubernetes-sigs/image-builder/patches/0011-Remove-containerd-configuration-for-hosts.toml-paths.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 0f8e88a6ffa5dc30233ef1a84de996fa0a4486b5 Mon Sep 17 00:00:00 2001
1+
From d2b744ec479a33432d319f6b525c3c6f1298be36 Mon Sep 17 00:00:00 2001
22
From: Abhay Krishna Arunachalam <[email protected]>
33
Date: Thu, 19 Sep 2024 16:04:19 -0700
44
Subject: [PATCH 11/13] Remove containerd configuration for hosts.toml paths

projects/kubernetes-sigs/image-builder/patches/0012-Revert-updating-preseed-and-cloud-init-to-use-CD-for.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 6ea8dd405e58493c6369d63d7d61504bd9701123 Mon Sep 17 00:00:00 2001
1+
From 84476d2ad3c940ff82c047a6c66a037ccc6b03ce Mon Sep 17 00:00:00 2001
22
From: Abhay Krishna Arunachalam <[email protected]>
33
Date: Thu, 19 Sep 2024 18:52:00 -0700
44
Subject: [PATCH 12/13] Revert updating preseed and cloud-init to use CD for

projects/kubernetes-sigs/image-builder/patches/0013-Revert-Optionally-source-etc-default-kubelet-in-kube.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From c00f08072de2bca6fefe33eb9a721ea057b3c100 Mon Sep 17 00:00:00 2001
1+
From 18b1771fe5565472aa31a2abd7a39745517f769a Mon Sep 17 00:00:00 2001
22
From: Saurabh Parekh <[email protected]>
33
Date: Thu, 3 Oct 2024 21:24:40 -0700
44
Subject: [PATCH 13/13] Revert "Optionally source /etc/default/kubelet in

0 commit comments

Comments
 (0)