Skip to content

Commit 4d774ff

Browse files
committed
OCPBUGS-19833 Updating upgrade instruction from 410
1 parent 641bea1 commit 4d774ff

File tree

3 files changed

+118
-2
lines changed

3 files changed

+118
-2
lines changed

modules/nw-metalLB-basic-upgrade-operator.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ $ oc get csv -n metallb-system
5959
[source,terminal,subs="attributes+"]
6060
----
6161
NAME DISPLAY VERSION REPLACES PHASE
62-
metallb-operator.4.{product-version}.0-202207051316 MetalLB Operator 4.{product-version}.0-202207051316 Succeeded
62+
metallb-operator.{product-version}.0-202207051316 MetalLB Operator {product-version}.0-202207051316 Succeeded
6363
----
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * operators/metallb/metallb-upgrading-operator.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="olm-updating-metallb-operatorgroup_{context}"]
7+
= Editing the MetalLB Operator Operator group
8+
9+
When upgrading from any MetalLB Operator version up to and including 4.10 to 4.11 and later, remove `spec.targetNamespaces` from the Operator group custom resource (CR). You must remove the spec regardless of whether you used the web console or the CLI to delete the MetalLB Operator.
10+
[NOTE]
11+
====
12+
The MetalLB Operator version 4.11 or later only supports the `AllNamespaces` install mode, whereas 4.10 or earlier versions support `OwnNamespace` or `SingleNamespace` modes.
13+
====
14+
15+
.Prerequisites
16+
17+
- You have access to an {product-title} cluster with `cluster-admin` permissions.
18+
- You have installed the OpenShift CLI (`oc`).
19+
20+
.Procedure
21+
22+
. List the Operator groups in the `metallb-system` namespace by running the following command:
23+
+
24+
[source,terminal]
25+
----
26+
$ oc get operatorgroup -n metallb-system
27+
----
28+
+
29+
.Example output
30+
31+
[source,terminal]
32+
----
33+
NAME AGE
34+
metallb-system-7jc66 85m
35+
----
36+
37+
. Verify that the `spec.targetNamespaces` is present in the Operator group CR associated with the `metallb-system` namespace by running the following command:
38+
+
39+
[source,terminal]
40+
----
41+
$ oc get operatorgroup metallb-system-7jc66 -n metallb-system -o yaml
42+
----
43+
+
44+
.Example output
45+
[source,terminal]
46+
----
47+
apiVersion: operators.coreos.com/v1
48+
kind: OperatorGroup
49+
metadata:
50+
annotations:
51+
olm.providedAPIs: ""
52+
creationTimestamp: "2023-10-25T09:42:49Z"
53+
generateName: metallb-system-
54+
generation: 1
55+
name: metallb-system-7jc66
56+
namespace: metallb-system
57+
resourceVersion: "25027"
58+
uid: f5f644a0-eef8-4e31-a306-e2bbcfaffab3
59+
spec:
60+
targetNamespaces:
61+
- metallb-system
62+
upgradeStrategy: Default
63+
status:
64+
lastUpdated: "2023-10-25T09:42:49Z"
65+
namespaces:
66+
- metallb-system
67+
----
68+
69+
. Edit the Operator group and remove the `targetNamespaces` and `metallb-system` present under the `spec` section by running the following command:
70+
+
71+
[source,terminal]
72+
----
73+
$ oc edit n metallb-system
74+
----
75+
+
76+
.Example output
77+
+
78+
[source,terminal]
79+
----
80+
operatorgroup.operators.coreos.com/metallb-system-7jc66 edited
81+
----
82+
83+
. Verify the `spec.targetNamespaces` is removed from the Operator group custom resource associated with the `metallb-system` namespace by running the following command:
84+
+
85+
[source,terminal]
86+
----
87+
$ oc get operatorgroup metallb-system-7jc66 -n metallb-system -o yaml
88+
----
89+
+
90+
.Example output
91+
[source,terminal]
92+
----
93+
apiVersion: operators.coreos.com/v1
94+
kind: OperatorGroup
95+
metadata:
96+
annotations:
97+
olm.providedAPIs: ""
98+
creationTimestamp: "2023-10-25T09:42:49Z"
99+
generateName: metallb-system-
100+
generation: 2
101+
name: metallb-system-7jc66
102+
namespace: metallb-system
103+
resourceVersion: "61658"
104+
uid: f5f644a0-eef8-4e31-a306-e2bbcfaffab3
105+
spec:
106+
upgradeStrategy: Default
107+
status:
108+
lastUpdated: "2023-10-25T14:31:30Z"
109+
namespaces:
110+
- ""
111+
----
112+
113+

networking/metallb/metallb-upgrading-operator.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ A summary of the upgrade procedure for the MetalLB Operator from 4.10 and earlie
1919
This procedure does not apply to automatic z-stream updates of the MetalLB Operator, which follow the standard straightforward method.
2020
====
2121

22-
For detailed steps to upgrade the MetalLB Operator from 4.10 and earlier, see the guidance that follows.
22+
For detailed steps to upgrade the MetalLB Operator from 4.10 and earlier, see the guidance that follows. As a cluster administrator, start the upgrade process by deleting the MetalLB Operator by using the OpenShift CLI (`oc`) or the web console.
2323

2424
//Delete metallb using web console
2525
include::modules/olm-deleting-metallb-operators-from-a-cluster-using-web-console.adoc[leveloffset=+1]
2626

2727
//Delete metallb using cli
2828
include::modules/olm-deleting-metallb-operators-from-a-cluster-using-cli.adoc[leveloffset=+1]
2929

30+
//Delete targetNamespace
31+
include::modules/olm-updating-metallb-operatorgroup.adoc[leveloffset=+1]
32+
3033
//Upgrade the MetalLB
3134
include::modules/nw-metalLB-basic-upgrade-operator.adoc[leveloffset=+1]
3235

0 commit comments

Comments
 (0)