mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
103 lines
3.4 KiB
Plaintext
103 lines
3.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * networking/metallb/metallb-upgrading-operator.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="upgrading-metallb-operator_{context}"]
|
|
= Manually upgrading the MetalLB Operator
|
|
|
|
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.
|
|
|
|
.Prerequisites
|
|
|
|
* You updated your cluster to the latest z-stream release.
|
|
* You used OperatorHub to install the MetalLB Operator.
|
|
* Access the cluster as a user with the `cluster-admin` role.
|
|
|
|
.Procedure
|
|
|
|
. Get the YAML definition of the `metallb-operator` subscription in the `metallb-system` namespace by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc -n metallb-system get subscription metallb-operator -o yaml
|
|
----
|
|
|
|
. Edit the `Subscription` CR by setting the `installPlanApproval` parameter to `Manual`:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operators.coreos.com/v1alpha1
|
|
kind: Subscription
|
|
metadata:
|
|
name: metallb-operator
|
|
namespace: metallb-system
|
|
# ...
|
|
spec:
|
|
channel: stable
|
|
installPlanApproval: Manual
|
|
name: metallb-operator
|
|
source: redhat-operators
|
|
sourceNamespace: openshift-marketplace
|
|
# ...
|
|
----
|
|
|
|
. Find the latest {product-title} {product-version} version of the MetalLB Operator by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc -n metallb-system get csv
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal,subs="attributes+"]
|
|
----
|
|
NAME DISPLAY VERSION REPLACES PHASE
|
|
metallb-operator.v{product-version}.0 MetalLB Operator {product-version}.0 Succeeded
|
|
----
|
|
|
|
. Check the install plan that exists in the namespace by entering the following command.
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc -n metallb-system get installplan
|
|
----
|
|
+
|
|
.Example output that shows install-tsz2g as a manual install plan
|
|
[source,terminal,subs="attributes+"]
|
|
----
|
|
NAME CSV APPROVAL APPROVED
|
|
install-shpmd metallb-operator.v4.18.0-202502261233 Automatic true
|
|
install-tsz2g metallb-operator.v{product-version}.0-202503102139 Manual false
|
|
----
|
|
|
|
. 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`.
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc edit installplan <name_of_installplan> -n metallb-system
|
|
----
|
|
+
|
|
.. With the install plan open in your editor, set the `spec.approval` parameter to `Manual` and set the `spec.approved` parameter to `true`.
|
|
+
|
|
[NOTE]
|
|
====
|
|
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.
|
|
====
|
|
|
|
.Verification
|
|
|
|
. Verify the upgrade was successful by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc -n metallb-system get csv
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME DISPLAY VERSION REPLACE PHASE
|
|
metallb-operator.v4.19.0-202503102139 MetalLB Operator {product-version}.0-202503102139 metallb-operator.v4.18.0-202502261233 Succeeded
|
|
----
|