Upgrade on Kubernetes using Helm
This procedure upgrades a Helm deployment of Anchore Enterprise to a newer release within the same major version. Before you begin, review Prepare for the Upgrade.
If you use your own secret (useExistingSecrets: true), add ANCHORE_AUTH_SECRET to your Anchore Enterprise secret before upgrading to v6.1 or later. If you do not, some services will not start after the upgrade.
If you use the chart’s default secret (useExistingSecrets: false), you do not need to do anything. The chart creates this value automatically.
Database column encryption is optional and off by default, so it is not a prerequisite for this upgrade. To enable it, supply a key — either anchoreConfig.database.encryption.currentKey in your values file, or ANCHORE_DB_ENCRYPTION_KEY_CURRENT in your own secret if you use useExistingSecrets: true. You can do this during this upgrade or at any later point. See Encrypting Database Secrets at Rest.
pg_cron logging settings. If cron.log_run and cron.log_statement are still at their default of on, pg_cron records every maintenance-job run in a table that is never pruned, and in the database server log. Anchore recommends turning both off. This is a database setting, separate from the chart, and it can be changed before or after this upgrade. See Limit pg_cron Logging.kubectlImage, before running helm upgrade below.A Helm pre-upgrade hook initiates a Kubernetes job that scales down all active Anchore Enterprise pods and handles the Anchore Enterprise database upgrade.
The Helm upgrade is marked as successful only upon the job’s completion. This process causes the Helm client to pause until the job finishes and new Anchore Enterprise pods are initiated. To monitor the upgrade, you can follow the logs of the upgrade jobs:
kubectl get jobs -n ${NAMESPACE}
kubectl logs -f job/<JOB_NAME> -n ${NAMESPACE}
These jobs are automatically removed after a subsequent successful Helm upgrade.
--timeout to the helm upgrade command (for example --timeout 3600s for a one-hour window), sized to your deployment.An alternative post-upgrade hook is available to perform Anchore Enterprise upgrades without forcing all pods to terminate prior to running the upgrade. To enable the post-upgrade hook, set upgradeJob.usePostUpgradeHook=true in your values file.
View both the Helm Chart Release Notes for any necessary steps prior to upgrading and also review the Anchore Enterprise Release Notes
Update the Helm repository to get the latest chart version.
helm repo updateUpgrade Anchore Enterprise using the Helm chart.
export NAMESPACE=anchore export RELEASE=my-release helm upgrade ${RELEASE} -n ${NAMESPACE} anchore/enterprise -f anchore_values.yamlReview the helm upgrade command output
Once upgraded, you can review the new state of your Anchore Enterprise install to verify the new version is running using the regular system status command.
anchorectl system status