Skip to content

Commit 07141ea

Browse files
committed
Change OperatorUpgradeable type to string and add utils func
Use string as OperatorUpgradeable type instead of intermediate type ConditionType. Add utils func FindConditionType to look up Condition type. Signed-off-by: Vu Dinh <[email protected]>
1 parent b55a341 commit 07141ea

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pkg/operators/v1/operatorcondition_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
const (
88
// OperatorUpgradeable indicates that the operator is upgradeable
9-
OperatorUpgradeable ConditionType = "OperatorUpgradeable"
9+
OperatorUpgradeable string = "OperatorUpgradeable"
1010
)
1111

1212
// OperatorConditionSpec allows a cluster admin to convey information about the state of an operator to OLM, potentially overriding state reported by the operator.

pkg/operators/v1alpha1/clusterserviceversion_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ const (
379379
CSVReasonCannotModifyStaticOperatorGroupProvidedAPIs ConditionReason = "CannotModifyStaticOperatorGroupProvidedAPIs"
380380
CSVReasonDetectedClusterChange ConditionReason = "DetectedClusterChange"
381381
CSVReasonInvalidWebhookDescription ConditionReason = "InvalidWebhookDescription"
382+
CSVReasonOperatorConditionNotUpgradeable ConditionReason = "OperatorConditionNotUpgradeable"
382383
)
383384

384385
// HasCaResources returns true if the CSV has owned APIServices or Webhooks.

0 commit comments

Comments
 (0)