You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To manually control upgrading the MetalLB Operator, you must edit the `Subscription` custom resource (CR) that subscribes the namespace to `metallb-system`. A `Subscription` CR is created as part of the Operator installation and the CR has the `installPlanApproval` parameter set to `Automatic` by default.
10
10
11
11
.Prerequisites
12
12
13
+
* You updated your cluster to the latest z-stream release.
14
+
* You used OperatorHub to install the MetalLB Operator.
13
15
* Access the cluster as a user with the `cluster-admin` role.
14
16
15
17
.Procedure
16
18
17
-
. Verify that the `metallb-system` namespace still exists:
19
+
. Get the YAML definition of the `metallb-operator` subscription in the `metallb-system` namespace by entering the following command:
18
20
+
19
21
[source,terminal]
20
22
----
21
-
$ oc get namespaces | grep metallb-system
23
+
$ oc -n metallb-system get subscription metallb-operator -o yaml
22
24
----
25
+
26
+
. Edit the `Subscription` CR by setting the `installPlanApproval` parameter to `Manual`:
23
27
+
24
-
.Example output
25
-
[source,terminal]
28
+
[source,yaml]
26
29
----
27
-
metallb-system Active 31m
30
+
apiVersion: operators.coreos.com/v1alpha1
31
+
kind: Subscription
32
+
metadata:
33
+
name: metallb-operator
34
+
namespace: metallb-system
35
+
# ...
36
+
spec:
37
+
channel: stable
38
+
installPlanApproval: Manual
39
+
name: metallb-operator
40
+
source: redhat-operators
41
+
sourceNamespace: openshift-marketplace
42
+
# ...
28
43
----
29
44
30
-
. Verify the `metallb` custom resource still exists:
45
+
. Find the latest {product-title}{product-version} version of the MetalLB Operator by entering the following command:
. Follow the guidance in "Installing from OperatorHub using the CLI" to install the latest {product-version} version of the MetalLB Operator.
74
+
. Edit the install plan that exists in the namespace by entering the following command. Ensure that you replace `<name_of_installplan>` with the name of the install plan, such as `install-tsz2g`.
.. With the install plan open in your editor, set the `spec.approval` parameter to `Manual` and set the `spec.approved` parameter to `true`.
45
82
+
46
83
[NOTE]
47
84
====
48
-
When installing the latest {product-version} version of the MetalLB Operator, you must install the Operator to the same namespace it was previously installed to.
85
+
After you edit the install plan, the upgrade operation starts. If you enter the `oc -n metallb-system get csv` command during the upgrade operation, the output might show the `Replacing` or the `Pending` status.
49
86
====
50
87
51
-
. Verify the upgraded version of the Operator is now the {product-version} version.
88
+
.Verification
89
+
90
+
. Verify the upgrade was successful by entering the following command:
** If more than one catalog is installed in a namespace, run the following command to look up the available versions and channels of an Operator from a specific catalog:
132
+
. If more than one catalog is installed in a namespace, run the following command to look up the available versions and channels of an Operator from a specific catalog:
133
133
+
134
134
[source,terminal]
135
135
----
@@ -155,7 +155,7 @@ If the Operator you intend to install supports the `SingleNamespace` install mod
155
155
====
156
156
You can only have one Operator group per namespace. For more information, see "Operator groups".
157
157
====
158
-
158
+
+
159
159
.. Create an `OperatorGroup` object YAML file, for example `operatorgroup.yaml`, for `SingleNamespace` install mode:
160
160
+
161
161
.Example `OperatorGroup` object for `SingleNamespace` install mode
@@ -171,7 +171,7 @@ spec:
171
171
- <namespace> <1>
172
172
----
173
173
<1> For `SingleNamespace` install mode, use the same `<namespace>` value for both the `metadata.namespace` and `spec.targetNamespaces` fields.
. Create a `Subscription` object to subscribe a namespace to an Operator:
183
-
183
+
+
184
184
.. Create a YAML file for the `Subscription` object, for example `subscription.yaml`:
185
185
+
186
186
[NOTE]
@@ -264,9 +264,9 @@ spec:
264
264
<1> Set the approval strategy to `Manual` in case your specified version is superseded by a later version in the catalog. This plan prevents an automatic upgrade to a later version and requires manual approval before the starting CSV can complete the installation.
265
265
<2> Set a specific version of an Operator CSV.
266
266
====
267
-
267
+
+
268
268
.. For clusters on cloud providers with token authentication enabled, such as {aws-first} {sts-first}, {entra-first}, or {gcp-wid-first}, configure your `Subscription` object by following these steps:
269
-
269
+
+
270
270
... Ensure the `Subscription` object is set to manual update approvals:
271
271
+
272
272
.Example `Subscription` object with manual update approvals
@@ -281,11 +281,10 @@ spec:
281
281
----
282
282
<1> Subscriptions with automatic approvals for updates are not recommended because there might be permission changes to make before updating. Subscriptions with manual approvals for updates ensure that administrators have the opportunity to verify the permissions of the later version, take any necessary steps, and then update.
283
283
====
284
-
284
+
+
285
285
... Include the relevant cloud provider-specific fields in the `Subscription` object's `config` section:
286
286
+
287
-
--
288
-
* If the cluster is in AWS STS mode, include the following fields:
287
+
If the cluster is in AWS STS mode, include the following fields:
289
288
+
290
289
.Example `Subscription` object with {aws-short}{sts-short} variables
291
290
[%collapsible]
@@ -302,8 +301,8 @@ spec:
302
301
----
303
302
<1> Include the role ARN details.
304
303
====
305
-
306
-
* If the cluster is in {entra-short} mode, include the following fields:
304
+
+
305
+
If the cluster is in {entra-short} mode, include the following fields:
307
306
+
308
307
.Example `Subscription` object with {entra-short} variables
309
308
[%collapsible]
@@ -326,8 +325,8 @@ spec:
326
325
<2> Include the tenant ID.
327
326
<3> Include the subscription ID.
328
327
====
329
-
330
-
* If the cluster is in {gcp-wid-short} mode, include the following fields:
328
+
+
329
+
If the cluster is in {gcp-wid-short} mode, include the following fields:
331
330
+
332
331
.Example `Subscription` object with {gcp-wid-short} variables
333
332
[%collapsible]
@@ -344,9 +343,10 @@ spec:
344
343
- name: SERVICE_ACCOUNT_EMAIL
345
344
value: "<service_account_email>" <2>
346
345
----
347
-
346
+
====
347
+
+
348
348
where:
349
-
349
+
+
350
350
`<audience>`:: Created in {gcp-short} by the administrator when they set up {gcp-wid-short}, the `AUDIENCE` value must be a preformatted URL in the following format:
0 commit comments