If you’re using the default internal postgresql for the Varnish Controller helm chart, you need to do manually upgrade postgres before upgrading the helm chart.
By default, this chart is using an internal postgresql database. To verify if you are using an external postgres, you should have set postgresql.enable to false in your values.yaml. In that case, you do not need to perform this manual upgrade, and you can upgrade the helm chart normally without extra steps.
To do this upgrade when you are using internal postgres, you need to do these extra steps:
Stop Brainz
Scale the brainz deployment to 0 to prevent changes during backup:
kubectl scale deployment <name>-brainz --replicas=0
Backup the Database:
Enter the shell of the existing PostgreSQL pod:
kubectl exec -it <postgresql-pod-name> -- bash
Create a PostgreSQL dump of the database and save it to the persistent directory:
pg_dumpall -U postgres > /bitnami/postgresql/backup.sql
Prepare for Upgrade:
Rename the current PostgreSQL data directory to ensure it is preserved in case of issues after the upgrade:
mv /bitnami/postgresql/data /bitnami/postgresql/data-old
Upgrade the Helm Chart:
Restore the Database:
After upgrading the Helm chart, enter the shell of the newly upgraded PostgreSQL pod:
kubectl exec -it <new-postgresql-pod-name> -- bash
Restore the backup by running the following command:
psql -U postgres -h localhost -f /bitnami/postgresql/backup.sql
Start brainz
Scale the brainz deployment back up to (at least) 1
kubectl scale deployment <name>-brainz --replicas=1
Verify the Upgrade:
vcli and access the API.Remove Backup Files:
Once verified, enter the shell of the PostgreSQL pod again and remove the backup files to clean up:
rm /bitnami/postgresql/backup.sql
rm -r /bitnami/postgresql/data-old
varnish-enterprise:
varnish-controller
varnish-enterprise
powerdns.service.annotationsvarnish-controller
varnish-enterprise:
varnish-controller
varnish-enterprise:
server.parameters for setting -p argumentsvarnish-enterprise:
server.mse4 settings for configuring Massive Storage Engine 4varnish-controler:
varnish-controler-router:
Varnish Enterprise Helm Chart has an important behavior change in this version.
Before v1.6.0, an EmptyDir was mounted to /etc/varnish to Varnish Enterprise Pod and shared between all containers as release-name-config. From v1.6.0, this is now changed to /etc/varnish/shared with the volume mount name also renamed to release-name-config-shared to reflect this fact.
This change is to allow Varnish Enterprise Helm Chart to use the bundled VCL within a Docker image, when a custom image with bundled VCL is used in a release pipeline. As a result of this change, server.vclConfig and server.vclConfigs are no longer required, and Varnish Enterprise Helm Chart will use the VCL bundled in the Docker image as its entrypoint (as specified by server.vclConfigPath).
When upgrading from a version prior to v1.6.0, please verify that you do not have {{ .Release.Name }}-config mounts in your values.yaml. If you do, please migrate to {{ .Release.Name }}-config-shared and update paths to /etc/varnish/shared accordingly.
varnish-enterprise:
server.agent.autoRemove for automatically de-registering agent during Pod rolloutserver.agent.extraArgs for setting additional arguments to Varnish Controller Agentserver.autoscaling.behavior for settings autoscaling behaviorserver.delayedShutdown to wait for connection drain before shutting downserver.initAgent.enabled to set whether to use init container to initialize agentserver.vclConfig and server.vclConfigs behavior to use the bundled VCL in the Docker image when unset (allow for easier bundling of VCL in a custom Docker image)server.autoscaling.minReplicas to inherit from server.replicas by defaultvarnish-controller:
apigw.autoscaling.behavior for settings autoscaling behaviorapigw.extraArgs for setting additional arguments to API-GWapigw.service.annotations for setting API-GW service annotationsbrainz.autoscaling.behavior for settings autoscaling behaviorbrainz.extraArgs for setting additional arguments to Brainzui.autoscaling.behavior for settings autoscaling behaviorui.extraArgs for setting additional arguments to Brainzui.service.annotations for setting UI service annotationssecretCredentials.create for enabling and disabling automatic secret creationglobal.controller.image and make all controller components inherited from itvarnish-controller-router:
powerdns.extraArgs for setting additional arguments to PowerDNS Server processrouter.extraArgs for setting additional arguments to Varnish Controller Router processvarnish-enterprise:
varnish-controller:
varnish-controller-router:
global.annotations for setting annotations globallyglobal.labels for setting labels globallyglobal.podAnnotations for setting pod annotations globallyglobal.podLabels for setting pod labels globallyglobal.resources for setting resources globallyvarnish-enterprise:
server.extraEnvs for setting extra environment variables for Varnish Enterprise containerserver.agent.extraEnvs for setting extra environment variables for Varnish Controller Agent containerserver.agent.extraVolumeMounts for mounting extra volumes into Varnish Controller Agent containerserver.agent.privateToken for setting Varnish Controller’s Private Tokenserver.initAgent.extraVolumeMounts for mounting extra volumes into Varnish Controller Agent’s init containerserver.initAgent.securityContext for setting securityContext for Varnish Controller Agent’s init containerserver.varnishncsa.extraVolumeMounts for mounting extra volumes into varnishncsa containervarnish-controller:
apigw.extraEnvs to accept an object, an array, or a template stringbrainz.extraEnvs to accept an object, an array, or a template stringui.extraEnvs to accept an object, an array, or a template stringvarnish-controller-router:
powerdns.extraEnvs to accept an object, an array, or a template stringrouter.extraEnvs to accept an object, an array, or a template stringvarnish-enterprise:
server.baseUrl for setting a Base URL for Varnish Controller Routerserver.loadBalancerIP for setting a pre-allocated IP address for LoadBalancer serviceserver.useReleaseName for using release name as a name for Varnish Controller Agentserver.hostNetwork/etc/varnish and related ConfigMapsvarnish-controller:
varnish-controller-router:
varnish-enterprise:
server.extraVolumeClaimTemplates for StatefulSet for specifying custom PVCserver.mse.persistence.bookSize and server.mse.persistence.storeSize for configuring book and storeserver.secretFrom for specifying Varnish secret from external secretglobal.natsServer.internal.passwordFrom for specifying NATS password from external secretserver.admin.port will make Varnish Controller Agent fail to connectserver.http.port will make Varnish Controller Agent fail to connectvarnish-controller:
global.natsServer.internal.passwordFrom for specifying NATS password from external secretbrainz.modAdminUser.passwordFrom for specifying Brainz password from external secretbrainz.externalPostgresql.passwordFrom for specifying PostgreSQL password from external secretvarnish-enterprise:
server.shareProcessNamespace to enable PID namespace sharing in a Podvarnish-controller:
varnish-enterprise:
server.cmdfileConfig for setting the content of cmdfileserver.vclConfigPath for setting the path to store the default VCL fileserver.vclConfigs for adding extra VCLsserver.pdb for configuring PodDisruptionBudgetserver.varnishncsa.startupProbe to varnishncsahttpGet option to varnish-enterprise probes for enabling HTTP probevarnish-controller:
global.natsServer.externalAddress produces invalid YAMLvarnish-enterprise:
server.startupProbe for setting startupProbeserver.strategy for setting deployment strategy for Deployment manifestserver.updateStrategy for setting update strategy for StatefulSet and DaemonSet manifestsserver.varnishncsa.resource produces invalid manifestglobal.natsServer.externalAddressvarnish-controller:
apigw.startupProbe and ui.startupProbe for setting startupProbeapigw.livenessProbe and ui.livenessProbe for setting livenessProbeapigw.readinessProbe and ui.readinessProbe for setting livenessProbeapigw.strategy, brainz.strategy, and ui.strategy for setting deployment strategyglobal.natsServer.externalAddress