Skip to content

Add Orka CLI wrapper for multiple cluster support

Adrien Kohlbecker requested to merge ak/wrapper into master

As we're now ramping up our use of the secondary Orka cluster, as both a development environment and a failover target for the primary cluster, it becomes important to be able to manage both effectively.

Unfortunately, using the Orka CLI directly does not work for this use case:

  • it only remembers the configuration of the last cluster your connected to. This is painful to configure each time because it requires fetching various metadata from 1password, such as the license key, API endpoint, and user credentials
  • at any point in time we can have various versions of the API running, and the CLI needs to be kept in sync. At the moment we have 1.6 on primary and 1.7 on secondary.

This merge request introduces a wrapper for the Orka CLI that solves those problems. This is inspired by tools like tfenv

  1. It stores and remembers credentials and metadata for both our clusters
  2. It ensures the correct version of the CLI is installed and used, based on the API version running on a given cluster

I've been using it for a few days and it works well, besides having to adjust your muscle memory to type either orka dev ... or orka prod ... Let me know what you think.

Merge request reports