Skip to content

Upgrading to 0.8.x

This guide explains how to upgrade from 0.7.x to 0.8.x.

Before you begin the upgrade process, ensure that you have a backup of your data.

The upgrade process will not touch the actual backup data, but will change the resource definitions and recreate the Deployments of backups.

Follow the steps in this checklist to upgrade to 0.8.x.

Pause all backups to prevent any changes to the backup data by setting the .spec.enabled field to false.

#!/usr/bin/sh
for backup_name in $(kubectl get backups -n [NAMESPACE] -o custom-columns='NAME:.metadata.name' --no-headers)
do
kubectl patch --type merge backup -n [NAMESPACE] "$backup_name" -p '{"spec":{"enabled": false}}'
done

Replace [NAMESPACE] with the namespace where the backups are located.

Pause the existing operator by setting the .spec.replicas field to 0.

Terminal window
$ kubectl scale deployment kannika-operator -n kannika-system --replicas=0

This will ensure no changes are made to the existing resources while the upgrade is in progress.

Install the new Custom Resource Definitions (CRDs) for 0.8.x.:

Terminal window
$ kubectl apply -f https://docs.kannika.io/refs/0.8.0/crd/kannika-crd-v1alpha.yml
Terminal window
$ helm install kannika-crd oci://quay.io/kannika/charts/kannika-crd \
--version 0.8.0

Install application with updated Helm values

Section titled “Install application with updated Helm values”

The new version of Kannika Armory adds the following options to the installation process:

Example Helm chart values that you can add to your values.yaml file:

values.yaml
api:
# Add a persistent volume for the API
storage:
persistentVolume:
enabled: true
size: 10Gi
storageClass: "default"
# Add OIDC to the API
22 collapsed lines
config:
security:
enabled: true
oidc:
issuerUri: "https://my-issuer-uri"
audience: "my-audience"
console:
config:
apiUrl: "https://api.kannika.my-domain.com"
security:
# Log users out after 15 minutes of inactivity
userInactivityTimeoutSeconds: 900
# Add OIDC to the console
oidc:
enabled: true
clientId: "my-client-id"
audience: "my-audience"
scope: "openid profile email"
authEndpoint: "https://my-auth-endpoint"
tokenEndpoint: "https://my-token-endpoint"
logoutEndpoint: "https://my-logout-endpoint"

Install the new version of Kannika Armory using Helm:

Terminal window
$ helm upgrade --install kannika oci://quay.io/kannika/charts/kannika \
--create-namespace \
--namespace kannika-system \
--version 0.8.0 \
--values values.yaml

For more installation options, see Installation.

Once you have completed the upgrade process, enable backups again by setting the .spec.enabled field to true.

#!/usr/bin/sh
for backup_name in $(kubectl get backups -n [NAMESPACE] -o custom-columns='NAME:.metadata.name' --no-headers)
do
kubectl patch --type merge backup -n [NAMESPACE] "$backup_name" -p '{"spec":{"enabled": true}}'
done

Replace [NAMESPACE] with the namespace where the backups are located.

Verify that the upgrade was successful by checking the logs of the Kannika Armory components:

Terminal window
$ kubectl logs -n kannika-system -l app.kubernetes.io/name=kannika-operator
$ kubectl logs -n kannika-system -l app.kubernetes.io/name=kannika-api
$ kubectl logs -n kannika-system -l app.kubernetes.io/name=kannika-console

Verify that the backups are running as expected:

Terminal window
$ kubectl get backups -n [NAMESPACE]

If you encounter any issues during the upgrade process, do not hesitate to contact us on Slack.