Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cherrypick: Adds pre/post boot and node roles (#2474) #2509

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adds pre/post boot and node roles (#2474)
As per kubernetes-sigs/image-builder#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.
vasyl-purchel authored and jaxesn committed Sep 21, 2023
commit f0d2f389bfc225235469eb0a6073cb5da3569816
14 changes: 14 additions & 0 deletions projects/aws/image-builder/builder/types.go
Original file line number Diff line number Diff line change
@@ -70,20 +70,23 @@ type VsphereConfig struct {
IsoConfig
RhelConfig
ExtraPackagesConfig
ExtraOverridesConfig
}

type BaremetalConfig struct {
AdditionalFiles []File `json:"files"`
IsoConfig
RhelConfig
ExtraPackagesConfig
ExtraOverridesConfig
}

type CloudstackConfig struct {
AnsibleUserVars string `json:"ansible_user_vars"`
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,10 +127,20 @@ type AMIConfig struct {
VolumeType string `json:"volume_type"`

ExtraPackagesConfig
ExtraOverridesConfig
}

type ExtraPackagesConfig struct {
ExtraDebs string `json:"extra_debs,omitempty"`
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"`
}