Skip to content

Commit

Permalink
lca: Add ability to set pull-secret for pulling images.
Browse files Browse the repository at this point in the history
This commit will allow setting the pull-secret next to
the seedimage to pull.

Signed-off-by: Alexander Chuzhoy <[email protected]>
  • Loading branch information
achuzhoy committed Feb 12, 2024
1 parent 928a017 commit 6067de3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/lca/imagebasedupgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,21 @@ func (builder *ImageBasedUpgradeBuilder) WithSeedImageVersion(
return builder
}

// WithSeedImagePullSecretRef sets the imagebasedupgrade with reference to the pull-secret
// for pulling the seed image.
func (builder *ImageBasedUpgradeBuilder) WithSeedImagePullSecretRef(
pullSecretName string) *ImageBasedUpgradeBuilder {
if valid, _ := builder.validate(); !valid {
return builder
}

glog.V(100).Infof("Setting pull-secret %s in imagebasedupgrade for pulling the seed image", pullSecretName)

builder.Definition.Spec.SeedImageRef.PullSecretRef = &lcav1alpha1.PullSecretRef{Name: pullSecretName}

return builder
}

// WaitUntilStageComplete waits the specified timeout for the imagebasedupgrade to complete
// actions for the provided stage .
func (builder *ImageBasedUpgradeBuilder) WaitUntilStageComplete(stage string) (*ImageBasedUpgradeBuilder, error) {
Expand Down

0 comments on commit 6067de3

Please sign in to comment.