зеркало из https://github.com/Azure/ARO-RP.git
Do not try to set UpgradeableTo annotation in-cluster if it is empty (#3963)
This commit is contained in:
Родитель
8a03424fab
Коммит
f8133771c5
|
@ -542,6 +542,10 @@ func (o *operator) EnsureUpgradeAnnotation(ctx context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
if o.oc.Properties.PlatformWorkloadIdentityProfile.UpgradeableTo == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
upgradeableTo := string(*o.oc.Properties.PlatformWorkloadIdentityProfile.UpgradeableTo)
|
||||
upgradeableAnnotation := "cloudcredential.openshift.io/upgradeable-to"
|
||||
|
||||
|
|
|
@ -504,7 +504,7 @@ func TestCheckPodImageVersion(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestTestEnsureUpgradeAnnotation(t *testing.T) {
|
||||
func TestEnsureUpgradeAnnotation(t *testing.T) {
|
||||
UpgradeableTo1 := api.UpgradeableTo("4.14.59")
|
||||
|
||||
for _, tt := range []struct {
|
||||
|
@ -528,6 +528,14 @@ func TestTestEnsureUpgradeAnnotation(t *testing.T) {
|
|||
PlatformWorkloadIdentityProfile: &api.PlatformWorkloadIdentityProfile{},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "upgradeableto not set",
|
||||
cluster: api.OpenShiftClusterProperties{
|
||||
PlatformWorkloadIdentityProfile: &api.PlatformWorkloadIdentityProfile{
|
||||
UpgradeableTo: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "no version persisted in cluster document, persist it",
|
||||
cluster: api.OpenShiftClusterProperties{
|
||||
|
|
Загрузка…
Ссылка в новой задаче