From a12f7a50e5341ab61e29d43804362976c521abbe Mon Sep 17 00:00:00 2001 From: Vasyl Purchel Date: Thu, 7 Sep 2023 17:18:03 +0100 Subject: [PATCH] Adds pre/post boot and node roles 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/aws/image-builder/builder/types.go b/projects/aws/image-builder/builder/types.go index d7ffc98acd..af798fa086 100644 --- a/projects/aws/image-builder/builder/types.go +++ b/projects/aws/image-builder/builder/types.go @@ -77,6 +77,7 @@ type BaremetalConfig struct { IsoConfig RhelConfig ExtraPackagesConfig + ExtraOverridesConfig } type CloudstackConfig struct { @@ -130,3 +131,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 bool `json:"disable_public_repos,omitempty"` + ReenablePublicRepos bool `json:"reenable_public_repos,omitempty"` +}