Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRT-1599: Add exception for cluster-storage-operator for Available=False during upgrades #28743

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/openshift/origin/pkg/monitortests/clusterversionoperator/operatorstateanalyzer"

configv1 "github.com/openshift/api/config/v1"
configclient "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1"
"github.com/openshift/origin/pkg/monitor/monitorapi"
"github.com/openshift/origin/pkg/monitortestlibrary/platformidentification"
platformidentification2 "github.com/openshift/origin/pkg/monitortestlibrary/platformidentification"
Expand Down Expand Up @@ -101,6 +102,21 @@ func testUpgradeOperatorStateTransitions(events monitorapi.Intervals, clientConf
if replicaCount, _ := checkReplicas("openshift-image-registry", operator, clientConfig); replicaCount == 1 {
return "image-registry has only single replica", nil
}
case "storage":
// Allow transitions during upgrade for the cluster-storage-operator for vsphere since it has only 1 replica.
configClient, err := configclient.NewForConfig(clientConfig)
if err != nil {
return "Error creating clientConfig during exception check", err
}
infrastructure, err := configClient.Infrastructures().Get(context.TODO(), "cluster", metav1.GetOptions{})
if err != nil {
return "Error getting platform type during exception check", err
}
if infrastructure.Status.PlatformStatus.Type == configv1.VSpherePlatformType {
if replicaCount, _ := checkReplicas("openshift-cluster-storage-operator", "cluster-storage-operator", clientConfig); replicaCount == 1 {
return "cluster-storage-operator has only single replica", nil
}
}
}

return "", nil
Expand Down