Upgrade Dex

This guide will walk you through upgrading Dex.

What You’ll Need

Procedure

  1. Go to your GitOps repository, inside your rok-tools management environment:

    root@rok-tools:~# cd ~/ops/deployments
  2. Delete the Dex Deployment in the auth namespace:

    root@rok-tools:~/ops/deployments# kubectl delete deploy -n auth dex \ > --ignore-not-found deployment.apps "dex" deleted

    Note

    EKF 2.0.X deploys Dex as a StatefulSet with persistent storage provided by Rok.

  3. Upgrade Dex:

    root@rok-tools:~/ops/deployments# rok-deploy --apply \ > kubeflow/manifests/common/dex/overlays/deploy
  4. Remove any stale custom resources that Dex might have left behind while operating with Kubernetes CRDs as its storage backend:

    root@rok-tools:~/ops/deployments# kubectl delete -n auth --all \ > --ignore-not-found \ > authcodes.dex.coreos.com,\ > authrequests.dex.coreos.com,\ > connectors.dex.coreos.com,\ > devicerequests.dex.coreos.com,\ > devicetokens.dex.coreos.com,\ > oauth2clients.dex.coreos.com,\ > offlinesessionses.dex.coreos.com,\ > passwords.dex.coreos.com,\ > refreshtokens.dex.coreos.com,\ > signingkeies.dex.coreos.com offlinesessions.dex.coreos.com "3opdnr6v5xfwg" deleted signingkey.dex.coreos.com "openid-connect-keys" deleted

    Note

    EKF 2.0.X changes Dex’s storage backend from Kubernetes to SQLite3. As such, after applying the latest manifests, Dex will stop garbage collecting any existing CRs.

Verify

  1. Go to your GitOps repository, inside your rok-tools management environment:

    root@rok-tools:~# cd ~/ops/deployments
  2. Ensure that Dex is up and running. Verify that field READY is 1/1:

    root@rok-tools:~/ops/deployments# kubectl get sts -n auth NAME READY AGE dex 1/1 1m

Summary

You have successfully upgraded Dex.

What’s Next

The next step is to apply the latest manifest changes to Rok.