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
Collect correct manifest config map per provider while performing upgrade
Clusterctl upgrade logic validates other installed providers, while
perfoming upgrade for version compatibility. Operator stores this data
in a ConfigMap to allow air-gapped support. This ensures we fetch
correct configMap first, to validate version against correct metadata.yaml.
Signed-off-by: Danil Grigorev <[email protected]>
returnnil, wrapPhaseError(err, "failed to check the config map repository existence for provider "+provider.String(), operatorv1.ProviderUpgradedCondition)
returnnil, wrapPhaseError(fmt.Errorf("config map not found"), "config map repository required for validation does not exist yet for provider "+provider.String(), operatorv1.ProviderUpgradedCondition)
returnnil, fmt.Errorf("provider %s type is not supported %s", provider.Name(), provider.Type())
89
+
}
90
+
91
+
iferr:=cl.List(ctx, list); err!=nil {
92
+
returnnil, err
93
+
}
94
+
95
+
for_, p:=rangelist.GetItems() {
96
+
ifp.GetName() ==provider.Name() {
97
+
returnp, nil
98
+
}
99
+
}
100
+
101
+
returnnil, fmt.Errorf("unable to find provider manifest with name %s", provider.Name())
102
+
}
103
+
64
104
// RepositoryFactory returns the repository implementation corresponding to the provider URL.
65
105
// inspired by https://github.com/kubernetes-sigs/cluster-api/blob/124d9be7035e492f027cdc7a701b6b179451190a/cmd/clusterctl/client/repository/client.go#L170
0 commit comments