Skip to content

Commit

Permalink
ibu: extraManifests support
Browse files Browse the repository at this point in the history
Adding the option to add extraManifests to the IBU.
This in turn allows to create/configure resources
during upgrade.

Signed-off-by: Alexander Chuzhoy <[email protected]>
  • Loading branch information
achuzhoy committed Feb 6, 2024
1 parent 1de123d commit c11573f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/lca/imagebasedupgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,23 @@ func (builder *ImageBasedUpgradeBuilder) WithSeedImage(
return builder
}

// WithExtraManifests adds extraManifests to be used by the imagebasedupgrade.
// This is used to create/configure resources during upgrade.
func (builder *ImageBasedUpgradeBuilder) WithExtraManifests(
extraManifestsConfigMapName, extraManifestsConfigMapNamespace string) *ImageBasedUpgradeBuilder {
if valid, _ := builder.validate(); !valid {
return builder
}

glog.V(100).Infof("Appending extraManifests's configmap name %s in namespace %s to the imagebasedupgrade",
extraManifestsConfigMapName, extraManifestsConfigMapNamespace)

builder.Definition.Spec.ExtraManifests = append(builder.Definition.Spec.ExtraManifests,
lcav1alpha1.ConfigMapRef{Name: extraManifestsConfigMapName, Namespace: extraManifestsConfigMapNamespace})

return builder
}

// WithOadpContent adds oadpContent to be used by the imagebasedupgrade.
// This is used for backup/restore during upgrade.
func (builder *ImageBasedUpgradeBuilder) WithOadpContent(
Expand Down

0 comments on commit c11573f

Please sign in to comment.