Skip to content

Commit 25b29df

Browse files
authored
Fix CVO overrides (#1537)
Prior to OCP 4.10, the 'group' field in the override was ignored. Although "apps/v1" was the documented thing to pass, after openshift/cluster-version-operator#689 stopped ignoring the field, only "apps" works. My proposed fix for https://issues.redhat.com/browse/OCPBUGS-15390 is to make both work, so we might as well switch to the one that works with older releases.
1 parent d06b36e commit 25b29df

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

start-mao.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash -xe
22

33
# Tell the cluster-version-operator to resume managing the machine-api-operator
4-
oc patch clusterversion version --namespace openshift-cluster-version --type merge -p '{"spec":{"overrides":[{"kind":"Deployment","group":"apps/v1","name":"machine-api-operator","namespace":"openshift-machine-api","unmanaged":false}]}}'
4+
oc patch clusterversion version --namespace openshift-cluster-version --type merge -p '{"spec":{"overrides":[{"kind":"Deployment","group":"apps","name":"machine-api-operator","namespace":"openshift-machine-api","unmanaged":false}]}}'

stop-cbo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fi
1616

1717
# Tell the cluster-version-operator to stop managing the
1818
# cluster-baremetal-operator and baremetalhost CRD
19-
oc patch clusterversion version --namespace openshift-cluster-version --type merge -p '{"spec":{"overrides":[{"kind":"Deployment","group":"apps/v1","name":"cluster-baremetal-operator","namespace":"openshift-machine-api","unmanaged":true},{"kind":"CustomResourceDefinition","group":"apiextensions.k8s.io/v1","name":"baremetalhosts.metal3.io","namespace":"","unmanaged":true}]}}'
19+
oc patch clusterversion version --namespace openshift-cluster-version --type merge -p '{"spec":{"overrides":[{"kind":"Deployment","group":"apps","name":"cluster-baremetal-operator","namespace":"openshift-machine-api","unmanaged":true},{"kind":"CustomResourceDefinition","group":"apiextensions.k8s.io","name":"baremetalhosts.metal3.io","namespace":"","unmanaged":true}]}}'
2020

2121
# Stop any existing machine-api-operator
2222
oc scale deployment -n openshift-machine-api --replicas=0 cluster-baremetal-operator

stop-mao.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ else
1515
fi
1616

1717
# Tell the cluster-version-operator to stop managing the machine-api-operator
18-
oc patch clusterversion version --namespace openshift-cluster-version --type merge -p '{"spec":{"overrides":[{"kind":"Deployment","group":"apps/v1","name":"machine-api-operator","namespace":"openshift-machine-api","unmanaged":true}]}}'
18+
oc patch clusterversion version --namespace openshift-cluster-version --type merge -p '{"spec":{"overrides":[{"kind":"Deployment","group":"apps","name":"machine-api-operator","namespace":"openshift-machine-api","unmanaged":true}]}}'
1919

2020
# Stop any existing machine-api-operator
2121
oc scale deployment -n openshift-machine-api --replicas=0 machine-api-operator

0 commit comments

Comments
 (0)