---
title: downscaling things around CVO
tags: debugging
---
# downscaling things around CVO
in order to manipulate a cluster in ways that CVO would revert there are two choices
## downscale CVO to 0
### command
```shell=
k scale deployment --replicas 0 cluster-version-operator -n openshift-cluster-version
```
### before
```shell=
╰─ k get deployment -n openshift-cluster-version cluster-version-operator
NAME READY UP-TO-DATE AVAILABLE AGE
cluster-version-operator 1/1 1 1 80m
```
### after
```shell=
╰─ k get deployment -n openshift-cluster-version cluster-version-operator
NAME READY UP-TO-DATE AVAILABLE AGE
cluster-version-operator 0/0 0 0 80m
```
OR
## keep CVO but mark cluster as unmanaged (so you won't get things un-done by CVO)
### command
```shell=
oc patch clusterversion version --type=merge -p '{"spec": {"overrides":[{"kind": "Deployment", "name": "olm-operator", "namespace": "openshift-operator-lifecycle-manager", "unmanaged": true, "group": "apps"}]}}'
```
### before
```shell=
╰─ k get clusterversion version -o yaml | yq '.spec'
clusterID: c6b835b3-ebac-4988-9f34-baf0f9449665
╰─ k get clusterversion version -o yaml | yq '.spec.overrides'
null
```
### after
```shell=
╰─ k get clusterversion version -o yaml | yq '.spec.overrides'
- group: apps
kind: Deployment
name: olm-operator
namespace: openshift-operator-lifecycle-manager
unmanaged: true
```
#### or with jsonpath
```shell=
k get clusterversion version -o jsonpath='{.spec.overrides}'
[{"group":"apps","kind":"Deployment","name":"olm-operator","namespace":"openshift-operator-lifecycle-manager","unmanaged":true}]%
```