TSB Helm Upgrade
This document explains how you can leverage Helm Charts to upgrade the different elements of TSB. The document assumes that Helm is already installed in the system.
This document only applies to TSB instances created with Helm, not to upgrade from TCTL based installations.
Before you start, make sure that you have:
✓ Checked the new version's requirements
Prerequisites
Configure the Helm repository
- Add the repository:
helm repo add tetrate-tsb-helm 'https://charts.dl.tetrate.io/public/helm/charts/'
helm repo update - List the available versions:
helm search repo tetrate-tsb-helm -l
Backup the PostgreSQL database
Create a backup of your PostgreSQL database.
The exact procedure for connecting to the database may differ depending on your environment, please refer to the documentation for your environment.
Upgrade process
Verify the available TSB versions to upgrade and always aim to upgrade to the latest patch version:
helm search repo tetrate-tsb-helm --versions
And export the version as a variable:
export TSB_VERSION="<version-to-upgrade>"
Management Plane
Upgrade the management plane chart:
helm upgrade mp tetrate-tsb-helm/managementplane --set image.registry=${HUB} --set image.tag=${TSB_VERSION} --namespace tsb -f values-mp.yaml
Control Plane
Upgrade the control plane chart:
helm upgrade cp tetrate-tsb-helm/controlplane --set image.registry=${HUB} --set image.tag=${TSB_VERSION} --namespace istio-system -f values-cp.yaml --set-file secrets.clusterServiceAccount.JWK=/tmp/<cluster>.jwk
Additionally, if gitops
is not enabled, we will need to remove a ValidatingWebhookConfiguration
that was created in previous versions and is not needed anymore. To do so, we can list the ValidatingWebhookConfiguration
in the istio-system
namespace:
kubectl get validatingwebhookconfiguration -n istio-system
And remove the webhook called tsb-gitops-direct-webhook
:
kubectl delete validatingwebhookconfiguration -n istio-system tsb-gitops-direct-webhook
Data Plane
Upgrade the control plane chart:
helm upgrade dp tetrate-tsb-helm/dataplane --set image.registry=${HUB} --set image.tag=${TSB_VERSION} --namespace istio-gateway -f values-dp.yaml
Rollback
In case something goes wrong and you want to rollback TSB to the previous version, you will need to rollback the Management Plane, the Control Planes and the Data Planes charts.
Rollback the Control Plane
You can use helm rollback
to rollback the current revision. To see the current revisions, you can run:
helm history cp -n istio-system
And then you can rollback to the previous revision:
helm rollback cp <REVISION> -n istio-system
Rollback the Management Plane
Scale Down Pods in Management Plane
Scale down all of the pods that talk to Postgres in the Management Plane so that the it is inactive.
kubectl scale deployment tsb iam -n tsb --replicas=0
Restore PostgreSQL
Restore your PostgreSQL database from your backup. The exact procedure for connecting to the database may differ depending on your environment, please refer to the documentation for your environment.
Restore Management Plane
helm rollback mp <REVISION> -n tsb