Skip to content

Commit

Permalink
Drop SyncSets check
Browse files Browse the repository at this point in the history
  • Loading branch information
mociarain committed Jul 25, 2024
1 parent eefe6e8 commit cb566c4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 45 deletions.
1 change: 0 additions & 1 deletion pkg/hive/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ func (hr *clusterManager) IsClusterDeploymentReady(ctx context.Context, doc *api

checkConditions := map[hivev1.ClusterDeploymentConditionType]corev1.ConditionStatus{
hivev1.ProvisionedCondition: corev1.ConditionTrue,
hivev1.SyncSetFailedCondition: corev1.ConditionFalse,
hivev1.ControlPlaneCertificateNotFoundCondition: corev1.ConditionFalse,
hivev1.UnreachableCondition: corev1.ConditionFalse,
}
Expand Down
38 changes: 0 additions & 38 deletions pkg/hive/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ func TestIsClusterDeploymentReady(t *testing.T) {
Type: hivev1.ProvisionedCondition,
Status: corev1.ConditionTrue,
},
{
Type: hivev1.SyncSetFailedCondition,
Status: corev1.ConditionFalse,
},
{
Type: hivev1.ControlPlaneCertificateNotFoundCondition,
Status: corev1.ConditionFalse,
Expand All @@ -86,10 +82,6 @@ func TestIsClusterDeploymentReady(t *testing.T) {
Type: hivev1.ProvisionedCondition,
Status: corev1.ConditionTrue,
},
{
Type: hivev1.SyncSetFailedCondition,
Status: corev1.ConditionFalse,
},
{
Type: hivev1.ControlPlaneCertificateNotFoundCondition,
Status: corev1.ConditionFalse,
Expand All @@ -103,36 +95,6 @@ func TestIsClusterDeploymentReady(t *testing.T) {
},
wantResult: false,
},
{
name: "is not ready: syncset failed",
cd: &hivev1.ClusterDeployment{
ObjectMeta: metav1.ObjectMeta{
Name: ClusterDeploymentName,
Namespace: fakeNamespace,
},
Status: hivev1.ClusterDeploymentStatus{
Conditions: []hivev1.ClusterDeploymentCondition{
{
Type: hivev1.ProvisionedCondition,
Status: corev1.ConditionTrue,
},
{
Type: hivev1.SyncSetFailedCondition,
Status: corev1.ConditionTrue,
},
{
Type: hivev1.ControlPlaneCertificateNotFoundCondition,
Status: corev1.ConditionFalse,
},
{
Type: hivev1.UnreachableCondition,
Status: corev1.ConditionFalse,
},
},
},
},
wantResult: false,
},
{
name: "is not ready - condition is missing",
cd: &hivev1.ClusterDeployment{
Expand Down
5 changes: 2 additions & 3 deletions pkg/monitor/cluster/hiveregistrationstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ import (
)

var clusterDeploymentConditionsExpected = map[hivev1.ClusterDeploymentConditionType]corev1.ConditionStatus{
hivev1.ClusterReadyCondition: corev1.ConditionTrue,
hivev1.UnreachableCondition: corev1.ConditionFalse,
hivev1.SyncSetFailedCondition: corev1.ConditionFalse,
hivev1.ClusterReadyCondition: corev1.ConditionTrue,
hivev1.UnreachableCondition: corev1.ConditionFalse,
}

func (mon *Monitor) emitHiveRegistrationStatus(ctx context.Context) error {
Expand Down
5 changes: 2 additions & 3 deletions pkg/monitor/cluster/hiveregistrationstatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,8 @@ func TestRetrieveClusterDeployment(t *testing.T) {

func TestFilterClusterDeploymentConditions(t *testing.T) {
var testConditionList = map[hivev1.ClusterDeploymentConditionType]corev1.ConditionStatus{
hivev1.ClusterReadyCondition: corev1.ConditionTrue,
hivev1.UnreachableCondition: corev1.ConditionFalse,
hivev1.SyncSetFailedCondition: corev1.ConditionFalse,
hivev1.ClusterReadyCondition: corev1.ConditionTrue,
hivev1.UnreachableCondition: corev1.ConditionFalse,
}

for _, tt := range []struct {
Expand Down

0 comments on commit cb566c4

Please sign in to comment.