mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
Merge pull request #97352 from openshift-cherrypick-robot/cherry-pick-97272-to-enterprise-4.20
[enterprise-4.20] [WIP] OCPBUGS#59683: OLMv1: Fix CRD update check spec
This commit is contained in:
@@ -5,25 +5,25 @@
|
||||
:_mod-docs-content-type: PROCEDURE
|
||||
|
||||
[id="disabling-crd-preflight_{context}"]
|
||||
= Disabling CRD upgrade safety preflight check
|
||||
= Disabling the CRD upgrade safety preflight check
|
||||
|
||||
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.
|
||||
[role="_abstract"]
|
||||
|
||||
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`.
|
||||
|
||||
[WARNING]
|
||||
====
|
||||
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.
|
||||
====
|
||||
|
||||
You cannot disable individual field validators. If you disable the CRD upgrade safety preflight check, all field validators are disabled.
|
||||
You cannot disable individual field validators. If you disable the CRD upgrade safety preflight check, you disable all field validators.
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
The following checks are handled by the Kubernetes API server:
|
||||
If you disable the CRD upgrade safety preflight check in {olmv1-first}, the Kubernetes API server still prevents the following operations:
|
||||
|
||||
* The scope changes from `Cluster` to `Namespace` or from `Namespace` to `Cluster`
|
||||
* An existing stored version of the CRD is removed
|
||||
|
||||
After disabling the CRD upgrade safety preflight check via {olmv1-first}, these two operations are still prevented by Kubernetes.
|
||||
* Changing scope from `Cluster` to `Namespace` or from `Namespace` to `Cluster`
|
||||
* Removing an existing stored version of the CRD
|
||||
====
|
||||
|
||||
.Prerequisites
|
||||
@@ -39,25 +39,26 @@ After disabling the CRD upgrade safety preflight check via {olmv1-first}, these
|
||||
$ oc edit clusterextension <clusterextension_name>
|
||||
----
|
||||
|
||||
. Set the `preflight.crdUpgradeSafety.disabled` field to `true`:
|
||||
. Set the `install.preflight.crdUpgradeSafety.enforcement` field to `None`:
|
||||
+
|
||||
.Example `ClusterExtension` object
|
||||
[%collapsible]
|
||||
====
|
||||
[source,yaml]
|
||||
----
|
||||
apiVersion: olm.operatorframework.io/v1alpha1
|
||||
apiVersion: olm.operatorframework.io/v1
|
||||
kind: ClusterExtension
|
||||
metadata:
|
||||
name: clusterextension-sample
|
||||
name: clusterextension-sample
|
||||
spec:
|
||||
installNamespace: default
|
||||
packageName: argocd-operator
|
||||
version: 0.6.0
|
||||
namespace: default
|
||||
serviceAccount:
|
||||
name: sa-example
|
||||
source:
|
||||
sourceType: "Catalog"
|
||||
catalog:
|
||||
packageName: argocd-operator
|
||||
version: 0.6.0
|
||||
install:
|
||||
preflight:
|
||||
crdUpgradeSafety:
|
||||
disabled: true <1>
|
||||
crdUpgradeSafety:
|
||||
enforcement: None
|
||||
----
|
||||
<1> Set to `true`.
|
||||
====
|
||||
|
||||
|
||||
Reference in New Issue
Block a user