Skip to content

Commit

Permalink
Remove snapshotCRD controller from the code
Browse files Browse the repository at this point in the history
  • Loading branch information
gnufied committed Jul 7, 2023
1 parent 2b8e4fc commit 35bb66d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 382 deletions.
11 changes: 10 additions & 1 deletion pkg/operator/defaultstorageclass/controller.go
Expand Up @@ -93,7 +93,15 @@ func (c *Controller) sync(ctx context.Context, syncCtx factory.SyncContext) erro
Reason: "UnsupportedPlatform",
Message: syncErr.Error(),
}
// Set Available=true, Progressing=false - everything is OK and

upgradeableCnt := operatorapi.OperatorCondition{
Type: conditionsPrefix + operatorapi.OperatorStatusTypeUpgradeable,
Status: operatorapi.ConditionTrue,
Reason: "UnsupportedPlatform",
Message: syncErr.Error(),
}

// Set Available=true, Progressing=false, Upgradeable=true - everything is OK and
// there is nothing to do. ClusterOperatorStatusController needs
// at least one Available/Pogressing condition set to mark the
// overall ClusterOperator as Available + notPogressing.
Expand All @@ -104,6 +112,7 @@ func (c *Controller) sync(ctx context.Context, syncCtx factory.SyncContext) erro
v1helpers.UpdateConditionFn(disabledCnd),
v1helpers.UpdateConditionFn(availableCnd),
v1helpers.UpdateConditionFn(progressingCnd),
v1helpers.UpdateConditionFn(upgradeableCnt),
)
return updateErr
} else if syncErr == supportedByCSIError {
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/defaultstorageclass/controller_test.go
Expand Up @@ -152,6 +152,7 @@ func TestSync(t *testing.T) {
storage: csoclients.GetCR(
withTrueConditions(conditionsPrefix+"Disabled", conditionsPrefix+opv1.OperatorStatusTypeAvailable),
withFalseConditions(conditionsPrefix+opv1.OperatorStatusTypeProgressing),
withTrueConditions(conditionsPrefix+opv1.OperatorStatusTypeUpgradeable),
),
},
expectErr: false,
Expand Down
120 changes: 0 additions & 120 deletions pkg/operator/snapshotcrd/controller.go

This file was deleted.

0 comments on commit 35bb66d

Please sign in to comment.