Skip to content

Commit 07022d3

Browse files
Merge pull request #97351 from openshift-cherrypick-robot/cherry-pick-97272-to-enterprise-4.19
[enterprise-4.19] [WIP] OCPBUGS#59683: OLMv1: Fix CRD update check spec
2 parents 77e0a89 + 4372db2 commit 07022d3

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

modules/disabling-crd-preflight.adoc

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
:_mod-docs-content-type: PROCEDURE
66

77
[id="disabling-crd-preflight_{context}"]
8-
= Disabling CRD upgrade safety preflight check
8+
= Disabling the CRD upgrade safety preflight check
99

10-
The custom resource definition (CRD) upgrade safety preflight check can be disabled by adding the `preflight.crdUpgradeSafety.disabled` field with a value of `true` to the `ClusterExtension` object that provides the CRD.
10+
[role="_abstract"]
11+
12+
You can disable the custom resource definition (CRD) upgrade safety preflight check. In the `ClusterExtension` object that provides the CRD, set the `install.preflight.crdUpgradeSafety.enforcement` field with the value of `None`.
1113

1214
[WARNING]
1315
====
1416
Disabling the CRD upgrade safety preflight check could break backwards compatibility with stored versions of the CRD and cause other unintended consequences on the cluster.
1517
====
1618

17-
You cannot disable individual field validators. If you disable the CRD upgrade safety preflight check, all field validators are disabled.
19+
You cannot disable individual field validators. If you disable the CRD upgrade safety preflight check, you disable all field validators.
1820

1921
[NOTE]
2022
====
21-
The following checks are handled by the Kubernetes API server:
22-
23-
* The scope changes from `Cluster` to `Namespace` or from `Namespace` to `Cluster`
24-
* An existing stored version of the CRD is removed
23+
If you disable the CRD upgrade safety preflight check in {olmv1-first}, the Kubernetes API server still prevents the following operations:
2524
26-
After disabling the CRD upgrade safety preflight check via {olmv1-first}, these two operations are still prevented by Kubernetes.
25+
* Changing scope from `Cluster` to `Namespace` or from `Namespace` to `Cluster`
26+
* Removing an existing stored version of the CRD
2727
====
2828

2929
.Prerequisites
@@ -39,25 +39,26 @@ After disabling the CRD upgrade safety preflight check via {olmv1-first}, these
3939
$ oc edit clusterextension <clusterextension_name>
4040
----
4141

42-
. Set the `preflight.crdUpgradeSafety.disabled` field to `true`:
42+
. Set the `install.preflight.crdUpgradeSafety.enforcement` field to `None`:
4343
+
4444
.Example `ClusterExtension` object
45-
[%collapsible]
46-
====
4745
[source,yaml]
4846
----
49-
apiVersion: olm.operatorframework.io/v1alpha1
47+
apiVersion: olm.operatorframework.io/v1
5048
kind: ClusterExtension
5149
metadata:
52-
name: clusterextension-sample
50+
name: clusterextension-sample
5351
spec:
54-
installNamespace: default
55-
packageName: argocd-operator
56-
version: 0.6.0
52+
namespace: default
53+
serviceAccount:
54+
name: sa-example
55+
source:
56+
sourceType: "Catalog"
57+
catalog:
58+
packageName: argocd-operator
59+
version: 0.6.0
60+
install:
5761
preflight:
58-
crdUpgradeSafety:
59-
disabled: true <1>
62+
crdUpgradeSafety:
63+
enforcement: None
6064
----
61-
<1> Set to `true`.
62-
====
63-

0 commit comments

Comments
 (0)