Skip to content

Commit

Permalink
Adds pre/post boot and node roles (#2474)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vasyl-purchel authored Sep 18, 2023
1 parent 12257a6 commit 914a208
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions projects/aws/image-builder/builder/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ type VsphereConfig struct {
RhelConfig
ProxyConfig
ExtraPackagesConfig
ExtraOverridesConfig
}

type BaremetalConfig struct {
Expand All @@ -79,6 +80,7 @@ type BaremetalConfig struct {
RhelConfig
ProxyConfig
ExtraPackagesConfig
ExtraOverridesConfig
}

type CloudstackConfig struct {
Expand All @@ -87,6 +89,7 @@ type CloudstackConfig struct {
RhelConfig
ProxyConfig
ExtraPackagesConfig
ExtraOverridesConfig
}

type IsoConfig struct {
Expand Down Expand Up @@ -114,6 +117,7 @@ type NutanixConfig struct {
NutanixSubnetName string `json:"nutanix_subnet_name"`
ProxyConfig
ExtraPackagesConfig
ExtraOverridesConfig
}

type AMIConfig struct {
Expand All @@ -130,6 +134,7 @@ type AMIConfig struct {

ProxyConfig
ExtraPackagesConfig
ExtraOverridesConfig
}

type ExtraPackagesConfig struct {
Expand All @@ -154,3 +159,12 @@ type RhsmConfig struct {
ActivationKey string `json:"rhsm_activation_key,omitempty"`
OrgId string `json:"rhsm_org_id,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"`
}

0 comments on commit 914a208

Please sign in to comment.