Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#41 from lreciomelero/fix/resetting…
Browse files Browse the repository at this point in the history
…_retain_functionality

[EOS-10953] fixed --retain bug
  • Loading branch information
lreciomelero committed Feb 14, 2023
2 parents 91f831c + 16aa97a commit 28672aa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/cluster/createoption.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,17 @@ func CreateWithRetain(retain bool) CreateOption {
}

func CreateWithMove(move bool) CreateOption {
return CreateWithRetain(move)
return createOptionAdapter(func(o *internalcreate.ClusterOptions) error {
o.Retain = move || o.Retain
return nil
})
}

func CreateWithAvoidCreation(avoidCreation bool) CreateOption {
return CreateWithRetain(avoidCreation)
return createOptionAdapter(func(o *internalcreate.ClusterOptions) error {
o.Retain = avoidCreation || o.Retain
return nil
})
}

// CreateWithWaitForReady configures a maximum wait time for the control plane
Expand Down

0 comments on commit 28672aa

Please sign in to comment.