This procedure covers upgrading from Apigee hybrid version 1.16.x to Apigee hybrid version 1.17.5 and from previous releases of hybrid 1.17.x to version 1.17.5.
Use the same procedures for minor version upgrades (for example version 1.16 to 1.17) and for patch release upgrades (for example 1.17.0 to 1.17.5).
If you are upgrading from Apigee hybrid version 1.15 or older, you must first upgrade to hybrid version 1.16 before upgrading to version 1.17.5. See the instructions for Upgrading Apigee hybrid to version 1.16.
Changes from Apigee hybrid v1.16
Please note the following changes:
- Model Context Protocol (MCP) support: Apigee hybrid version 1.17 adds support for the Model Context Protocol (MCP), an open protocol that lets agentic AI applications use your APIs as tools through managed MCP endpoints. Apigee hybrid routes, authorizes, and secures these MCP tool calls the same way it manages your other APIs, so you don't need to run or maintain your own MCP servers. For more information, see Model Context Protocol (MCP) in Apigee overview and the MCP quickstart.
- Root CA certificate rotation: Apigee hybrid version 1.17 adds support for rotating the root certificate authority (CA) certificate that anchors trust for TLS communication between your runtime components. You can now replace the root CA before it expires, without downtime, by following a phased rotation procedure. For more information, see Rotate the root CA certificate.
- TLS 1.3 support: Apigee hybrid version 1.17 adds support for TLS 1.3, the latest version of the Transport Layer Security protocol. TLS 1.3 offers faster connection handshakes and stronger security than earlier TLS versions. For information about configuring TLS on the ingress gateway, see Configuring TLS and mTLS on the ingress gateway.
- Forward proxy support for AI policies: Apigee hybrid version 1.17 adds forward proxy support for the AI policies, such as the Model Armor and semantic caching policies. Outbound calls that these policies make can now be routed through an HTTP forward proxy, which was not supported in earlier versions of Apigee hybrid. For more information, see Configure forward proxying for API proxies.
- Semantic cache Private Service Connect (PSC) endpoint support: Apigee hybrid version 1.17 adds Private Service Connect (PSC) endpoint support for semantic caching. The semantic caching policies can now reach their backing services over a Private Service Connect endpoint, which keeps that traffic on your private network. For more information, see Get started with semantic caching policies.
For additional information about features in Hybrid version 1.17, see the Apigee hybrid v1.17.5 release notes.
Prerequisites
Before upgrading to hybrid version 1.17, make sure your installation meets the following requirements:
- If your hybrid installation is running a version older than v1.16, you must upgrade to version 1.16 before upgrading to v1.17. See Upgrading Apigee hybrid to version 1.16.
- Helm version v3.14.2+.
kubectl: A supported version ofkubectlappropriate for your Kubernetes platform version. See Supported platforms and versions:kubectl.- cert-manager: A supported version of cert-manager. See Supported platforms and versions: cert-manager. If needed, you will upgrade cert-manager in the Prepare to upgrade to version 1.17 section below.
Before you upgrade to 1.17.5 - limitations and important notes
-
In version 1.17.3, the runtime continues to use
ApigeeRedis, and you don't need to change your configuration or install theapigee-valkeychart. Version 1.17.3 adds the following items:- The
ApigeeValkeycustom resource definition (CRD). You install it with the other CRDs in Prepare to upgrade. - The
apigee-valkeyHelm chart and thevalkeyconfiguration properties. - The
ao.args.valkeyBackendproperty, which isfalseby default. Leave it set tofalse.
In version 1.17.4, the runtime moves from
ApigeeRedistoApigeeValkey. Theao.args.valkeyBackendproperty istrueby default, and you install theapigee-valkeychart during the upgrade. Before you upgrade to version 1.17.4, read Prepare to move the runtime to Valkey.Version 1.17.5 makes no further change to this move. As in version 1.17.4, the runtime uses
ApigeeValkey, andApigeeRedisis still installed. Version 1.17.6 removesApigeeRedis. - The
Upgrading to Apigee hybrid version 1.17 may require downtime.
When upgrading the Apigee controller to version 1.17.5, all Apigee deployments undergo a rolling restart. To minimize downtime in production hybrid environments during a rolling restart, make sure you are running at least two clusters (in the same or different region/data center). Divert all production traffic to a single cluster and take the cluster you are about to upgrade offline, and then proceed with the upgrade process. Repeat the process for each cluster.
Apigee recommends that once you begin the upgrade, you should upgrade all clusters as soon as possible to reduce the chances of production impact. There is no time limit on when all remaining clusters must be upgraded after the first one is upgraded. However, until all remaining clusters are upgraded Cassandra backup and restore cannot work with mixed versions. For example, a backup from Hybrid 1.16 cannot be used to restore a Hybrid 1.17 instance.
Management plane changes do not need to be fully suspended during an upgrade. Any required temporary suspensions to management plane changes are noted in the upgrade instructions below.
Upgrading to version 1.17.5 overview
The procedures for upgrading Apigee hybrid are organized in the following sections:
Prepare to upgrade to version 1.17
Prepare to move the runtime to Valkey
Version 1.17.4 moves the runtime from ApigeeRedis to ApigeeValkey.
When you upgrade to version 1.17.4, do these steps in this order:
- Confirm that the cluster runs version 1.17.3 or later, or version 1.16.13 or a later 1.16 version. See Check the version and update your overrides file.
- Copy your
redisoverrides to avalkeyblock. See Check the version and update your overrides file. - Install the updated Apigee CRDs, and then upgrade the Apigee operator.
- Install the
apigee-valkeychart, and wait until theApigeeValkeyresource nameddefaultis running. - Upgrade the organization and the environments, and then verify that the runtime uses Valkey.
Keep the apigee-redis chart installed, and continue to upgrade it with the other
charts. Don't uninstall it. The runtime uses ApigeeRedis if
ApigeeValkey isn't running, and a rollback needs it.
Check the version and update your overrides file
-
Get the version label of the
ApigeeRedisresource:kubectl -n APIGEE_NAMESPACE get apigeeredis default \ -o jsonpath='{.metadata.labels.apigee\.cloud\.google\.com/hybrid-version}'The output must be
1.17.3or a later 1.17 version. If the output is empty or shows an earlier 1.17 version, upgrade all charts to version 1.17.3 first.If you upgrade from version 1.16, the output must be
1.16.13or a later 1.16 version. If it shows an earlier 1.16 version, upgrade all charts to version 1.16.13 first.The
apigee-operatorchart makes the same check, also when you use--dry-run=server. If the check fails, the operator upgrade stops with an error that starts withApigeeRedis default in namespace. Upgrade all charts to the version in the error, and then upgrade to version 1.17.4. Don't set thedisableMandatoryPreviousHybridVersionCheckForValkeyproperty, which skips the check. -
In your overrides file, add a
valkeyblock with the same properties and values as yourredisblock. Don't copy theredis.imageproperties. Theapigee-valkeychart uses the newapigee-valkeyimage. Keep theredisblock, because theapigee-redischart still uses it. For example:redis: auth: password: "PASSWORD" replicaCount: 2 valkey: auth: password: "PASSWORD" replicaCount: 2
If your overrides file has no
redisblock, you don't need avalkeyblock. Both charts use the same default values.If you copy container images to a private registry, also copy the
gcr.io/apigee-release/hybrid/apigee-valkeyimage, with the same tag as your other hybrid images. If you setredis.image.urlinstead ofhub, setvalkey.image.urlto theapigee-valkeyimage in your registry.If you set
redis.auth.secret, setvalkey.auth.secretto the same Kubernetes secret.If you set
redis.auth.secretProviderClassto read the password from Vault, setvalkey.auth.secretProviderClassto the same value. Then rewrite theapigee-redisVault role withvault write. Inbound_service_account_names, include the existing service account names and addapigee-valkey-defaultandapigee-valkey-envoy-default. The command replaces the whole list. To see the names that the role has now, run the following command:vault read auth/kubernetes/role/apigee-redis
Then rewrite the role. For example:
vault write auth/kubernetes/role/apigee-redis \ bound_service_account_names=BOUND_SA_NAMES,apigee-valkey-default,apigee-valkey-envoy-default \ bound_service_account_namespaces=APIGEE_NAMESPACE \ policies=apigee-redis-auth \ ttl=1m
BOUND_SA_NAMES is the list of names that the role has now. The
vault readoutput can show these names in brackets, separated by spaces. Invault write, give them as one comma-separated list, with no brackets or spaces.The
vault writecommand changes the fields that you give. Thevault readoutput can show thepoliciesandttlvalues astoken_policiesandtoken_ttl, with the TTL in seconds. If these values differ from the example, use your values. For more information, see Storing data in an external secret manager.If your overrides file sets
ao.args.valkeyBackendtofalse, remove that line.
Back up your hybrid installation
- These instructions use the environment variable APIGEE_HELM_CHARTS_HOME for the directory
in your file system where you have installed the Helm charts. If needed, change directory
into this directory and define the variable with the following command:
Linux
export APIGEE_HELM_CHARTS_HOME=$PWD
echo $APIGEE_HELM_CHARTS_HOMEMac OS
export APIGEE_HELM_CHARTS_HOME=$PWD
echo $APIGEE_HELM_CHARTS_HOMEWindows
set APIGEE_HELM_CHARTS_HOME=%CD%
echo %APIGEE_HELM_CHARTS_HOME% - Make a backup copy of your version 1.16
$APIGEE_HELM_CHARTS_HOME/directory. You can use any backup process. For example, you can create atarfile of your entire directory with:tar -czvf $APIGEE_HELM_CHARTS_HOME/../apigee-helm-charts-v1.16-backup.tar.gz $APIGEE_HELM_CHARTS_HOME - Back up your Cassandra database following the instructions in Cassandra backup and recovery.
-
Make sure that your TLS certificate and key files (
.crt,.key, and/or.pem) reside in the$APIGEE_HELM_CHARTS_HOME/apigee-virtualhost/directory.
Upgrade your Kubernetes version
Check your Kubernetes platform version and if needed, upgrade your Kubernetes platform to a version that is supported by both hybrid 1.16 and hybrid 1.17. Follow your platform's documentation if you need help.
Pull the Apigee Helm charts.
Apigee hybrid charts are hosted in Google Artifact Registry:
oci://us-docker.pkg.dev/apigee-release/apigee-hybrid-helm-charts
Using the pull command, copy all of the Apigee hybrid Helm
charts to your local storage with the following command:
export CHART_REPO=oci://us-docker.pkg.dev/apigee-release/apigee-hybrid-helm-chartsexport CHART_VERSION=1.17.5helm pull $CHART_REPO/apigee-operator --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-datastore --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-env --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-ingress-manager --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-org --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-redis --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-valkey --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-telemetry --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-virtualhost --version $CHART_VERSION --untar
Edit kustomization.yaml for a custom apigee namespace
If your Apigee namespace is not apigee, edit the apigee-operator/etc/crds/default/kustomization.yaml file and replace the namespace value with your Apigee namespace.
apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: APIGEE_NAMESPACE
If you are using apigee as your namespace you do not need to edit the file.
- Install the updated Apigee CRDs:
-
Use the
kubectldry-run feature by running the following command:kubectl apply -k apigee-operator/etc/crds/default/ --server-side --force-conflicts --validate=false --dry-run=server
-
After validating with the dry-run command, run the following command:
kubectl apply -k apigee-operator/etc/crds/default/ \ --server-side \ --force-conflicts \ --validate=false
- Validate the installation with the
kubectl get crdscommand:kubectl get crds | grep apigee
Your output should look something like the following:
apigeedatastores.apigee.cloud.google.com 2024-08-21T14:48:30Z apigeedeployments.apigee.cloud.google.com 2024-08-21T14:48:30Z apigeeenvironments.apigee.cloud.google.com 2024-08-21T14:48:31Z apigeeissues.apigee.cloud.google.com 2024-08-21T14:48:31Z apigeeorganizations.apigee.cloud.google.com 2024-08-21T14:48:32Z apigeeredis.apigee.cloud.google.com 2024-08-21T14:48:33Z apigeerouteconfigs.apigee.cloud.google.com 2024-08-21T14:48:33Z apigeeroutes.apigee.cloud.google.com 2024-08-21T14:48:33Z apigeetelemetries.apigee.cloud.google.com 2024-08-21T14:48:34Z apigeevalkeys.apigee.cloud.google.com 2024-08-21T14:48:34Z cassandradatareplications.apigee.cloud.google.com 2024-08-21T14:48:35Z
-
-
Check the labels on the cluster nodes. By default, Apigee schedules data pods on nodes with the label
cloud.google.com/gke-nodepool=apigee-dataand runtime pods are scheduled on nodes with the labelcloud.google.com/gke-nodepool=apigee-runtime. You can customize your node pool labels in theoverrides.yamlfile.For more information, see Configuring dedicated node pools.
Upgrade cert-manager
Apigee hybrid v1.17 supports cert-manager releases 1.16 through 1.19. There is a change in cert-manager 1.18 that can cause an issue with your traffic. In cert-manager release 1.18, the default value of Certificate.Spec.PrivateKey.rotationPolicy was changed from Never to Always. For upgraded Apigee hybrid installations, this can cause an issue with your traffic. When upgrading to hybrid v1.17 from an earlier version, you must either edit your apigee-ca certificate to compensate for this change or keep your version of cert-manager at release 1.17.x or lower.
Before upgrading cert-manager to 1.18 or 1.19, use the following steps procedure to edit your apigee-ca
certificate to set the value of Certificate.Spec.PrivateKey.rotationPolicy to Never.
-
Check the contents of your
apigee-cacertificate to see ifrotationPolicyis set:kubectl get certificate apigee-ca -n cert-manager -o yaml
Look for the values under
spec.privateKeyin the output:... spec: commonName: apigee-hybrid duration: 87600h isCA: true issuerRef: group: cert-manager.io kind: ClusterIssuer name: apigee-root-certificate-issuer privateKey: algorithm: ECDSA # Note: rotationPolicy would appear here if it is set. size: 256 secretName: apigee-ca ... -
If
rotationPolicyis not set or if it is set toAlways, edit theapigee-cacertificate to set the value ofrotationPolicytoNever:- Perform a dry run first:
kubectl patch Certificate \ --dry-run=server \ -n cert-manager \ --type=json \ -p='[{"op": "replace", "path": "/spec/privateKey/rotationPolicy", "value": "Never"}]' \ -o=yaml \ apigee-ca - Patch the certificate:
kubectl patch Certificate \ -n cert-manager \ --type=json \ -p='[{"op": "replace", "path": "/spec/privateKey/rotationPolicy", "value": "Never"}]' \ -o=yaml \ apigee-ca
- Perform a dry run first:
-
Verify that the value of
rotationPolicyis now set toNever:kubectl get certificate apigee-ca -n cert-manager -o yaml
The output should look similar to the following:
... spec: commonName: apigee-hybrid duration: 87600h isCA: true issuerRef: group: cert-manager.io kind: ClusterIssuer name: apigee-root-certificate-issuer privateKey: algorithm: ECDSA rotationPolicy: Never size: 256 secretName: apigee-ca ... -
Upgrade cert-manager. The following command will download and install cert-manager v1.19.2:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.2/cert-manager.yaml
See Supported platforms and versions: cert-manager for a list of supported versions.
See:
- Known issue 465834046
- cert-manager Release 1.18: The default value of
Certificate.Spec.PrivateKey.rotationPolicyis nowAlways
Install the hybrid 1.17.5 runtime
- If you have not, navigate into your
APIGEE_HELM_CHARTS_HOMEdirectory. Run the following commands from that directory. - Upgrade the Apigee Operator/Controller:
Dry run:
helm upgrade operator apigee-operator/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE \ --dry-run=server
Upgrade the chart:
helm upgrade operator apigee-operator/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE
Verify Apigee Operator installation:
helm ls -n APIGEE_NAMESPACE
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION operator apigee 3 2024-08-21 00:42:44.492009 -0800 PST deployed apigee-operator-1.17.5 1.17.5
Verify it is up and running by checking its availability:
kubectl -n APIGEE_NAMESPACE get deploy apigee-controller-manager
NAME READY UP-TO-DATE AVAILABLE AGE apigee-controller-manager 1/1 1 1 7d20h
- Upgrade the Apigee datastore:
Dry run:
helm upgrade datastore apigee-datastore/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE \ --dry-run=server
Upgrade the chart:
helm upgrade datastore apigee-datastore/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE
Verify
apigeedatastoreis up and running by checking its state:kubectl -n APIGEE_NAMESPACE get apigeedatastore default
NAME STATE AGE default running 2d
- Upgrade Apigee telemetry:
Dry run:
helm upgrade telemetry apigee-telemetry/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE \ --dry-run=server
Upgrade the chart:
helm upgrade telemetry apigee-telemetry/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE
Verify it is up and running by checking its state:
kubectl -n APIGEE_NAMESPACE get apigeetelemetry apigee-telemetry
NAME STATE AGE apigee-telemetry running 2d
- Upgrade Apigee Redis:
Dry run:
helm upgrade redis apigee-redis/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE \ --dry-run=server
Upgrade the chart:
helm upgrade redis apigee-redis/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE
Verify it is up and running by checking its state:
kubectl -n APIGEE_NAMESPACE get apigeeredis default
NAME STATE AGE default running 2d
- Install or upgrade Apigee Valkey:
Dry run:
helm upgrade valkey apigee-valkey/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE \ --dry-run=server
Install or upgrade the chart:
helm upgrade valkey apigee-valkey/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE
Wait until the
ApigeeValkeyresource is running:kubectl -n APIGEE_NAMESPACE wait apigeevalkey/default \ --for=jsonpath='{.status.state}'=running \ --timeout=10mVerify its state:
kubectl -n APIGEE_NAMESPACE get apigeevalkey default
NAME STATE AGE default running 5m
Don't upgrade the organization until the state is
running. - Upgrade Apigee ingress manager:
Dry run:
helm upgrade ingress-manager apigee-ingress-manager/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE \ --dry-run=server
Upgrade the chart:
helm upgrade ingress-manager apigee-ingress-manager/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE
Verify it is up and running by checking its availability:
kubectl -n APIGEE_NAMESPACE get deployment apigee-ingressgateway-manager
NAME READY UP-TO-DATE AVAILABLE AGE apigee-ingressgateway-manager 2/2 2 2 2d
- Upgrade the Apigee organization:
Dry run:
helm upgrade ORG_NAME apigee-org/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE \ --dry-run=server
Upgrade the chart:
helm upgrade ORG_NAME apigee-org/ \ --install \ --namespace APIGEE_NAMESPACE \ -f OVERRIDES_FILE
Verify it is up and running by checking the state of the respective org:
kubectl -n APIGEE_NAMESPACE get apigeeorg
NAME STATE AGE apigee-my-org-my-env running 2d
- Upgrade the environment.
You must install one environment at a time. Specify the environment with
--set env=ENV_NAME.Dry run:
helm upgrade ENV_RELEASE_NAME apigee-env/ \ --install \ --namespace APIGEE_NAMESPACE \ --set env=ENV_NAME \ -f OVERRIDES_FILE \ --dry-run=server
- ENV_RELEASE_NAME is a name used to keep track of installation and upgrades of the
apigee-envchart. This name must be unique from the other Helm release names in your installation. Usually this is the same asENV_NAME. However, if your environment has the same name as your environment group, you must use different release names for the environment and environment group, for exampledev-env-releaseanddev-envgroup-release. For more information on releases in Helm, see Three big concepts in the Helm documentation. - ENV_NAME is the name of the environment you are upgrading.
- OVERRIDES_FILE is your new overrides file for v.1.17.5
Upgrade the chart:
helm upgrade ENV_RELEASE_NAME apigee-env/ \ --install \ --namespace APIGEE_NAMESPACE \ --set env=ENV_NAME \ -f OVERRIDES_FILE
Verify it is up and running by checking the state of the respective env:
kubectl -n APIGEE_NAMESPACE get apigeeenv
NAME STATE AGE GATEWAYTYPE apigee-my-org-my-env running 2d
- ENV_RELEASE_NAME is a name used to keep track of installation and upgrades of the
- Verify that the runtime uses Valkey.
After you upgrade the organization and the environments, the Apigee operator moves the runtime to the
apigee-valkey-envoy-defaultservice, and the runtime pods of each environment restart. Do these steps afterkubectl -n APIGEE_NAMESPACE get apigeeenvshows every environment asrunning:-
Check that each organization names the
ApigeeValkeyresource:kubectl -n APIGEE_NAMESPACE get apigeeorg \ -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.valkeyRef}{"\n"}{end}'apigee-my-org-1a2b3c4 default
-
List the init containers of the runtime pods:
kubectl -n APIGEE_NAMESPACE get pods -l app=apigee-runtime \ -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.initContainers[*].name}{"\n"}{end}'Each runtime pod must list
apigee-valkey-envoy-readiness. If a pod listsapigee-redis-envoy-readiness, that pod still usesApigeeRedis. Wait until the restart is complete, and then run the command again.If the pods don't change, make sure that the
ApigeeValkeyresource is running and thatao.args.valkeyBackendisn't set tofalse. If theApigeeValkeyresource isn't running, the operator log has the textcannot be used yet, using redisRef:kubectl -n APIGEE_NAMESPACE logs deployment/apigee-controller-manager -c manager | grep "cannot be used yet"
-
-
Upgrade the environment groups (
virtualhosts).- You must upgrade one environment group (virtualhost) at a time. Specify the environment
group with
--set envgroup=ENV_GROUP_NAME. Repeat the following commands for each environment group mentioned in the overrides.yaml file:Dry run:
helm upgrade ENV_GROUP_RELEASE_NAME apigee-virtualhost/ \ --install \ --namespace APIGEE_NAMESPACE \ --set envgroup=ENV_GROUP_NAME \ -f OVERRIDES_FILE \ --dry-run=server
ENV_GROUP_RELEASE_NAME is the name with which you previously installed the
apigee-virtualhostchart. It is usually ENV_GROUP_NAME.Upgrade the chart:
helm upgrade ENV_GROUP_RELEASE_NAME apigee-virtualhost/ \ --install \ --namespace APIGEE_NAMESPACE \ --set envgroup=ENV_GROUP_NAME \ -f OVERRIDES_FILE
- Check the state of the ApigeeRoute (AR).
Installing the
virtualhostscreates ApigeeRouteConfig (ARC) which internally creates ApigeeRoute (AR) once the Apigee watcher pulls environment group-related details from the control plane. Therefore, check that the corresponding AR's state is running:kubectl -n APIGEE_NAMESPACE get arc
NAME STATE AGE apigee-org1-dev-egroup 2d
kubectl -n APIGEE_NAMESPACE get ar
NAME STATE AGE apigee-org1-dev-egroup-123abc running 2d
- You must upgrade one environment group (virtualhost) at a time. Specify the environment
group with
Rolling back to a previous version
To roll back to the previous version, use the older chart version to roll back the upgrade process in the reverse order. Start with apigee-virtualhost and work your way back to apigee-operator, and then revert the CRDs.
To roll back from version 1.17.4 to version 1.17.3, see Roll back version 1.17.4 to version 1.17.3.
- Revert the charts. The following commands assume you are using the charts from the previous version (v1.16.x).
-
Run the following command for each environment group:
helm upgrade ENV_GROUP_RELEASE_NAME apigee-virtualhost/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ --set envgroup=ENV_GROUP_NAME \ -f 1.16_OVERRIDES_FILE
-
Run the following command for each environment:
helm upgrade ENV_RELEASE_NAME apigee-env/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ --set env=ENV_NAME \ -f 1.16_OVERRIDES_FILE
-
apigee-org:helm upgrade ORG_NAME apigee-org/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f 1.16_OVERRIDES_FILE
-
apigee-ingress-manager:helm upgrade ingress-manager apigee-ingress-manager/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f 1.16_OVERRIDES_FILE
-
apigee-redis:helm upgrade redis apigee-redis/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f 1.16_OVERRIDES_FILE
-
apigee-telemetry:helm upgrade telemetry apigee-telemetry/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f 1.16_OVERRIDES_FILE
-
apigee-datastore:helm upgrade datastore apigee-datastore/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f 1.16_OVERRIDES_FILE
-
apigee-operator:helm upgrade operator apigee-operator/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f 1.16_OVERRIDES_FILE
-
- If you're rolling back to version 1.16, remove the
conversion webhook from the
apigeedatastores,apigeeredis, andapigeevalkeysCRDs. The version 1.17 CRDs add a conversion webhook to these CRDs, and the version 1.16 CRDs don't have one. If you skip this step, the next step fails with the errorspec.conversion.strategy: Required value. To remove the conversion webhook, run the following commands:kubectl patch crd apigeedatastores.apigee.cloud.google.com --type=merge \ -p '{"spec":{"conversion":{"strategy":"None","webhook":null}}}'kubectl patch crd apigeeredis.apigee.cloud.google.com --type=merge \ -p '{"spec":{"conversion":{"strategy":"None","webhook":null}}}'kubectl patch crd apigeevalkeys.apigee.cloud.google.com --type=merge \ -p '{"spec":{"conversion":{"strategy":"None","webhook":null}}}' - Revert the CRDs by reinstalling the older CRDs.
kubectl apply -k apigee-operator/etc/crds/default/ \ --server-side \ --force-conflicts \ --validate=false
Roll back version 1.17.4 to version 1.17.3
Use these steps to roll back a cluster from version 1.17.4 to version 1.17.3 after the
runtime moved to ApigeeValkey. In version 1.17.3, the Apigee operator runs with
ao.args.valkeyBackend set to false. After the rollback, the runtime
uses ApigeeRedis again.
In the following commands, PREVIOUS_OVERRIDES_FILE is the overrides file that you used for version 1.17.3.
-
Make sure that the
ApigeeRedisresource is running:kubectl -n APIGEE_NAMESPACE get apigeeredis default
The state must be
running. The runtime needsApigeeRedisafter the rollback. If the state isn'trunning, don't continue. Contact Google Cloud Customer Care. -
In a new directory, pull the version 1.17.3 charts:
mkdir -p PREVIOUS_CHARTS_DIR
cd PREVIOUS_CHARTS_DIRexport CHART_REPO=oci://us-docker.pkg.dev/apigee-release/apigee-hybrid-helm-chartsexport CHART_VERSION=1.17.3helm pull $CHART_REPO/apigee-operator --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-datastore --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-env --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-ingress-manager --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-org --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-redis --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-telemetry --version $CHART_VERSION --untarhelm pull $CHART_REPO/apigee-virtualhost --version $CHART_VERSION --untarPREVIOUS_CHARTS_DIR is a new directory for the version 1.17.3 charts. Run the following commands from this directory. If your Apigee namespace isn't
apigee, edit theapigee-operator/etc/crds/default/kustomization.yamlfile and replace thenamespacevalue with your Apigee namespace. -
Revert the environment groups, the environments, and the organization:
Run the following command for each environment group:
helm upgrade ENV_GROUP_RELEASE_NAME apigee-virtualhost/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ --set envgroup=ENV_GROUP_NAME \ -f PREVIOUS_OVERRIDES_FILE
Run the following command for each environment:
helm upgrade ENV_RELEASE_NAME apigee-env/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ --set env=ENV_NAME \ -f PREVIOUS_OVERRIDES_FILE
apigee-org:helm upgrade ORG_NAME apigee-org/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f PREVIOUS_OVERRIDES_FILE
After you revert
apigee-org, the organization no longer names theApigeeValkeyresource. Then the Apigee operator moves the runtime back toApigeeRedis, and the runtime pods restart. -
Verify that the runtime uses
ApigeeRedis:kubectl -n APIGEE_NAMESPACE get pods -l app=apigee-runtime \ -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.initContainers[*].name}{"\n"}{end}'Each runtime pod must list
apigee-redis-envoy-readiness. Wait until all runtime pods have restarted before you continue. -
Uninstall the
apigee-valkeychart:helm uninstall valkey --namespace APIGEE_NAMESPACE
-
Revert the other charts in this order:
apigee-ingress-manager:helm upgrade ingress-manager apigee-ingress-manager/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f PREVIOUS_OVERRIDES_FILE
apigee-redis:helm upgrade redis apigee-redis/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f PREVIOUS_OVERRIDES_FILE
apigee-telemetry:helm upgrade telemetry apigee-telemetry/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f PREVIOUS_OVERRIDES_FILE
apigee-datastore:helm upgrade datastore apigee-datastore/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f PREVIOUS_OVERRIDES_FILE
apigee-operator:helm upgrade operator apigee-operator/ \ --install \ --namespace APIGEE_NAMESPACE \ --atomic \ -f PREVIOUS_OVERRIDES_FILE
-
Revert the CRDs by reinstalling the version 1.17.3 CRDs:
kubectl apply -k apigee-operator/etc/crds/default/ \ --server-side \ --force-conflicts \ --validate=false