Skip to content

Commit 9dc4272

Browse files
Address feedback
1 parent b20ec97 commit 9dc4272

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

cmd/clusterctl/client/cluster/client.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ import (
3232
)
3333

3434
var (
35-
// CurrentContractVersion return the contract version supported by this Cluster API version.
35+
// CurrentContractVersion is the contract version supported by this Cluster API version.
3636
// Note: Each Cluster API version supports one contract version, and by convention the contract version matches the current API version.
3737
CurrentContractVersion = clusterv1.GroupVersion.Version
38+
)
3839

39-
// GetCompatibleContractVersions return the list of contract version compatible with a given contract version.
40-
// NOTE: A contract version might be compatible with older contract versions e.g. to allow users time to transition to the new API.
41-
// NOTE: The return value must include also the contract version received in input.
42-
GetCompatibleContractVersions = func(contract string) sets.Set[string] {
43-
compatibleContracts := sets.New(contract)
44-
if contract == "v1beta2" {
45-
compatibleContracts.Insert("v1beta1")
46-
}
47-
return compatibleContracts
40+
// GetCompatibleContractVersions return the list of contract version compatible with a given contract version.
41+
// NOTE: A contract version might be compatible with older contract versions e.g. to allow users time to transition to the new API.
42+
// NOTE: The return value must include also the contract version received in input.
43+
func GetCompatibleContractVersions(contract string) sets.Set[string] {
44+
compatibleContracts := sets.New(contract)
45+
if contract == "v1beta2" {
46+
compatibleContracts.Insert("v1beta1")
4847
}
49-
)
48+
return compatibleContracts
49+
}
5050

5151
// Kubeconfig is a type that specifies inputs related to the actual
5252
// kubeconfig.

cmd/clusterctl/client/cluster/installer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func (i *providerInstaller) Validate(ctx context.Context) error {
215215
return err
216216
}
217217
if !compatibleContracts.Has(providerContract) {
218-
return errors.Errorf("installing provider %q can lead to a non functioning management cluster: the target version for the provider implements the %s contract version, while the core provider is compatible with %s contract versions", components.ManifestLabel(), providerContract, strings.Join(compatibleContracts.UnsortedList(), ","))
218+
return errors.Errorf("installing provider %q could lead to a non functioning management cluster: the target version for the provider implements the %s contract version, while the core provider is compatible with %s contract versions", components.ManifestLabel(), providerContract, strings.Join(compatibleContracts.UnsortedList(), ","))
219219
}
220220
}
221221

0 commit comments

Comments
 (0)