Skip to content

Commit 63d53f0

Browse files
Add optional field to ClusterExtension API to skip CRD upgrade safety checks
Signed-off-by: Rashmi Gottipati <[email protected]>
1 parent 6d73b73 commit 63d53f0

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

api/v1alpha1/clusterextension_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ type ClusterExtensionSpec struct {
7373
// the bundle may contain resources that are cluster-scoped or that are
7474
// installed in a different namespace. This namespace is expected to exist.
7575
InstallNamespace string `json:"installNamespace"`
76+
77+
//+kubebuilder:validation:MaxLength:=10
78+
//+kubebuilder:Optional
79+
// skipCRDUpgradeSafetyCheck specifies whether or not the CRD upgrade safety checks should be skipped when attempting to install the cluster extension.
80+
SkipCRDUpgradeSafetyCheck bool `json:"skipCRDUpgradeSafetyCheck,omitempty"`
7681
}
7782

7883
const (

config/crd/bases/olm.operatorframework.io_clusterextensions.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ spec:
7474
maxLength: 64
7575
pattern: ^(\s*(=||!=|>|<|>=|=>|<=|=<|~|~>|\^)\s*(v?(0|[1-9]\d*|[x|X|\*])(\.(0|[1-9]\d*|x|X|\*]))?(\.(0|[1-9]\d*|x|X|\*))?(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?)\s*)((?:\s+|,\s*|\s*\|\|\s*)(=||!=|>|<|>=|=>|<=|=<|~|~>|\^)\s*(v?(0|[1-9]\d*|x|X|\*])(\.(0|[1-9]\d*|x|X|\*))?(\.(0|[1-9]\d*|x|X|\*]))?(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?)\s*)*$
7676
type: string
77+
skipCRDUpgradeSafetyCheck:
78+
description: skipCRDUpgradeSafetyCheck specifies whether or not the
79+
CRD upgrade safety checks should be skipped when attempting to install
80+
the cluster extension
81+
maxLength: 10
82+
type: boolean
7783
required:
7884
- installNamespace
7985
- packageName

0 commit comments

Comments
 (0)