Upgrading the VerticaDB operator
Vertica supports two separate options to upgrade the VerticaDB operator:
-
OperatorHub.io
-
Helm Charts
Note
You must upgrade the operator with the same option that you selected for installation. For example, you cannot install the VerticaDB operator with Helm charts, and then upgrade the operator in the same environment using OperatorHub.io.Prerequisites
- Complete Installing the VerticaDB operator
OperatorHub.io
Important
VerticaDB operator versions 1.x are namespace-scoped, and versions 2.x are cluster-scoped. To upgrade from version 1.x to 2.x, you must uninstall the operator in each namespace before you upgrade.
For detailed instructions about uninstalling your operator, see the OLM documentation.
The Operator Lifecycle Manager (OLM) operator manages upgrades for OperatorHub.io installations. You can configure the OLM operator to upgrade the VerticaDB operator manually or automatically with the Subscription object's spec.installPlanApproval
parameter.
Automatic upgrade
To configure automatic version upgrades, set spec.installPlanApproval
to Automatic
, or omit the setting entirely. When the OLM operator refreshes the catalog source, it installs the new VerticaDB operator automatically.
Manual upgrade
Upgrade the VerticaDB operator manually to approve version upgrades for specific install plans. To manually upgrade, set spec.installPlanApproval
parameter to Manual
and complete the following:
-
Verify if there is an install plan that requires approval to proceed with the upgrade:
$ kubectl get installplan NAME CSV APPROVAL APPROVED install-ftcj9 verticadb-operator.v1.7.0 Manual false install-pw7ph verticadb-operator.v1.6.0 Manual true
The command output shows that the install plan
install-ftcj9
for VerticaDB operator version 1.7.0 is not approved. -
Approve the install plan with a patch command:
$ kubectl patch installplan install-ftcj9 --type=merge --patch='{"spec": {"approved": true}}' installplan.operators.coreos.com/install-ftcj9 patched
After you set the approval, the OLM operator silently upgrades the VerticaDB operator.
-
Optional. To monitor its progress, inspect the STATUS column of the Subscription object:
$ kubectl describe subscription subscription-object-name
Helm charts
You must have cluster administrator privileges to upgrade the VerticaDB operator with Helm charts.
Important
VerticaDB operator versions 1.x are namespace-scoped, and versions 2.x are cluster-scoped. To upgrade from version 1.x to 2.x, you must uninstall the operator in each namespace before you upgrade.
You can uninstall the VerticaDB operator with the helm uninstall command:
$ helm uninstall vdb-op --namespace namespace
The Helm chart includes the CRD, but the helm install
command does not overwrite an existing CRD. To upgrade the operator, you must update the CRD with the manifest from the GitHub repository.
Additionally, you must upgrade the VerticaAutoscaler CRD and the EventTrigger CRD, even if you do not use either in your environment. These CRDs are installed with the operator and maintained as separate YAML manifests. Upgrade the VerticaAutoscaler and EventTrigger to ensure that your operator is upgraded completely.
Note
The followingkubectl apply
commands use the --server-side
and --force-conflicts
command options. These are required because the latest CRDs contain both the v1beta
and v1
API version manifests, and their file size is too large to install with only the client side. For more information, see the Server-Side Apply documentation.
Use kubectl apply
to upgrade the CRDs:
-
Upgrade the VerticaDB operator CRD:
$ kubectl apply --server-side=true --force-conflicts -f https://github.com/vertica/vertica-kubernetes/releases/latest/download/verticadbs.vertica.com-crd.yaml
-
Upgrade the VerticaAutoscaler CRD:
$ kubectl apply --server-side=true --force-conflicts -f https://github.com/vertica/vertica-kubernetes/releases/latest/download/verticaautoscalers.vertica.com-crd.yaml
-
Upgrade the EventTrigger CRD:
$ kubectl apply --server-side=true --force-conflicts -f https://github.com/vertica/vertica-kubernetes/releases/latest/download/eventtriggers.vertica.com-crd.yaml
-
Upgrade the Helm chart:
$ helm upgrade operator-name --wait vertica-charts/verticadb-operator