Skip to content

Commit 33310d6

Browse files
authored
Introduce UpgradeStrategy field to OperatorGroups (#235)
This commit introduces the upgradeStrategy field to the operatorGroup type. The upgradeStrategy field defines OLM behavior when upgrading operators in the namespace. Two upgrade strategies are currently supported, "Default" and "TechPreviewUnsafeFailForward". The "Default" strategy mimics existing behavior. The "TechPreviewUnsafeFailForward" strategy allows users to recover from failed installPlans or failed clusterServiceVersions, it should be noted that these upgrades are unsafe and can lead to unpredictable behavior and potentially dataloss.
1 parent a7ebc81 commit 33310d6

File tree

4 files changed

+136
-1
lines changed

4 files changed

+136
-1
lines changed

crds/operators.coreos.com_operatorgroups.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ spec:
3737
spec:
3838
description: OperatorGroupSpec is the spec for an OperatorGroup resource.
3939
type: object
40+
default:
41+
upgradeStrategy: Default
4042
properties:
4143
selector:
4244
description: Selector selects the OperatorGroup's target namespaces.
@@ -80,6 +82,13 @@ spec:
8082
items:
8183
type: string
8284
x-kubernetes-list-type: set
85+
upgradeStrategy:
86+
description: "UpgradeStrategy defines the upgrade strategy for operators in the namespace. There are currently two supported upgrade strategies: \n Default: OLM will only allow clusterServiceVersions to move to the replacing phase from the succeeded phase. This effectively means that OLM will not allow operators to move to the next version if an installation or upgrade has failed. \n TechPreviewUnsafeFailForward: OLM will allow clusterServiceVersions to move to the replacing phase from the succeeded phase or from the failed phase. Additionally, OLM will generate new installPlans when a subscription references a failed installPlan and the catalog has been updated with a new upgrade for the existing set of operators. \n WARNING: The TechPreviewUnsafeFailForward upgrade strategy is unsafe and may result in unexpected behavior or unrecoverable data loss unless you have deep understanding of the set of operators being managed in the namespace."
87+
type: string
88+
default: Default
89+
enum:
90+
- Default
91+
- TechPreviewUnsafeFailForward
8392
status:
8493
description: OperatorGroupStatus is the status for an OperatorGroupResource.
8594
type: object

0 commit comments

Comments
 (0)