You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🌱 Add support for compatible contracts to clusterctl (#12018)
* Add support for compatible contracts to clusterctl
* Address feedback
* More feedback
* Improve documentation about compatible contracts
* Fix new tests after rebase
returnerrors.Errorf("installing provider %q can lead to a non functioning management cluster: the target version for the provider supports the %s API Version of Cluster API (contract), while the management cluster is using %s", components.ManifestLabel(), providerContract, managementClusterContract)
217
+
if!compatibleContracts.Has(providerContract) {
218
+
returnerrors.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(), ","))
"CRDs. If not, this warning can be hidden by setting the %q' annotation.", obj.GetName(), correctCRDName, clusterctlv1.SkipCRDNamePreflightCheckAnnotation)
286
288
}
287
289
288
-
// getProviderContract returns the API Version of Cluster API (contract) for a provider instance.
290
+
// getProviderContract returns the contract versions supported by a provider instance.
// If the contract for the provider instance is already known, return it.
291
293
ifcontract, ok:=providerInstanceContracts[provider.InstanceName()]; ok {
@@ -321,8 +323,9 @@ func (i *providerInstaller) getProviderContract(ctx context.Context, providerIns
321
323
return"", errors.Errorf("invalid provider metadata: version %s for the provider %s does not match any release series", provider.Version, provider.InstanceName())
return"", errors.Errorf("current version of clusterctl is only compatible with %s providers, detected %s for provider %s", clusterv1.GroupVersion.Version, releaseSeries.Contract, provider.ManifestLabel())
return"", errors.Errorf("current version of clusterctl is only compatible with providers implementing the %s contract versions, detected contract version %s for provider %s", strings.Join(compatibleContracts.UnsortedList(), ", "), releaseSeries.Contract, provider.ManifestLabel())
0 commit comments