Skip to content

Commit

Permalink
lca: Adding oadpConent to ImageBasedUpgrade.
Browse files Browse the repository at this point in the history
This aims at helping with bckup/restore automation.

Signed-off-by: Alexander Chuzhoy <[email protected]>
  • Loading branch information
achuzhoy committed Feb 1, 2024
1 parent a2f9db0 commit 8a54101
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
}

// WithOadpContent adds oadpContent to be used by the imagebasedupgrade.
// This is used for backup/restore during upgrade.
func (builder *ImageBasedUpgradeBuilder) WithOadpContent(
oadpConentConfigMapName string, oadpConentConfigMapNamespace string) *ImageBasedUpgradeBuilder {
if valid, _ := builder.validate(); !valid {
return builder
}

glog.V(100).Infof("Appending oadpContent's configmap name %s in namespace %s to the imagebasedupgrade",
oadpConentConfigMapName, oadpConentConfigMapNamespace)

builder.Definition.Spec.OADPContent = append(builder.Definition.Spec.OADPContent,
lcav1alpha1.ConfigMapRef{Name: oadpConentConfigMapName, Namespace: oadpConentConfigMapNamespace})

return builder
}

// WithSeedImageVersion sets the seed image version used by the imagebasedupgrade.
func (builder *ImageBasedUpgradeBuilder) WithSeedImageVersion(
seedImageVersion string) *ImageBasedUpgradeBuilder {
Expand Down

0 comments on commit 8a54101

Please sign in to comment.