From f0d2f389bfc225235469eb0a6073cb5da3569816 Mon Sep 17 00:00:00 2001 From: Vasyl Purchel Date: Mon, 18 Sep 2023 21:29:35 +0100 Subject: [PATCH] Adds pre/post boot and node roles (#2474) As per https://github.com/kubernetes-sigs/image-builder/issues/894 issue upstream project opened to use custom Ansible roles pre/post boot of the node and also pre/post node provisioning. This opens doors to customize image built for custom requirements, for example if deployment needs to happen in offline environment that has no access to the internet and would require to update system with required changes to look for packages on internal proxies instead. Also allows to provide extra updates to the system before Kubernetes is installed along with extra tweaks after. --- projects/aws/image-builder/builder/types.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/projects/aws/image-builder/builder/types.go b/projects/aws/image-builder/builder/types.go index d7ffc98acd..c49354605c 100644 --- a/projects/aws/image-builder/builder/types.go +++ b/projects/aws/image-builder/builder/types.go @@ -70,6 +70,7 @@ type VsphereConfig struct { IsoConfig RhelConfig ExtraPackagesConfig + ExtraOverridesConfig } type BaremetalConfig struct { @@ -77,6 +78,7 @@ type BaremetalConfig struct { IsoConfig RhelConfig ExtraPackagesConfig + ExtraOverridesConfig } type CloudstackConfig struct { @@ -84,6 +86,7 @@ type CloudstackConfig struct { IsoConfig RhelConfig ExtraPackagesConfig + ExtraOverridesConfig } type IsoConfig struct { @@ -108,6 +111,7 @@ type NutanixConfig struct { NutanixPassword string `json:"nutanix_password"` NutanixSubnetName string `json:"nutanix_subnet_name"` ExtraPackagesConfig + ExtraOverridesConfig } type AMIConfig struct { @@ -123,6 +127,7 @@ type AMIConfig struct { VolumeType string `json:"volume_type"` ExtraPackagesConfig + ExtraOverridesConfig } type ExtraPackagesConfig struct { @@ -130,3 +135,12 @@ type ExtraPackagesConfig struct { ExtraRepos string `json:"extra_repos,omitempty"` ExtraRpms string `json:"extra_rpms,omitempty"` } + +type ExtraOverridesConfig struct { + FirstbootCustomRolesPre string `json:"firstboot_custom_roles_pre,omitempty"` + FirstbootCustomRolesPost string `json:"firstboot_custom_roles_post,omitempty"` + NodeCustomRolesPre string `json:"node_custom_roles_pre,omitempty"` + NodeCustomRolesPost string `json:"node_custom_roles_post,omitempty"` + DisablePublicRepos string `json:"disable_public_repos,omitempty"` + ReenablePublicRepos string `json:"reenable_public_repos,omitempty"` +}