We are setting up Blue/Green Kubernetes clusters. Basically I have two sets of Deployment Targets. One for the blue cluster and one for the green cluster.
When it is time to switch clusters, I use the API to swap the roles on the the deployment targets so that the incoming cluster gets all the deployments. I then use the API to redeploy the latest deployments to each environment for each tenant. This seems to work well.
My problem is for steps that use a worker. Just like my Deployment Targets, I have two sets of Worker Pools (and workers inside the pools), one for the Green cluster and One for the Blue cluster. But there is nothing like “roles” for workers. So I can’t change the workers for the a deployment
There is the ability to set the pool via a variable, but that variable is snapshot at Release creation time. So if I create a release with the variable set to the Blue Workers, then swap my the Green cluster in as the active cluster, when I go to deploy next, the variable is set to the wrong worker group (Blue). When it goes to run, there will not be any healthy workers in that group.
Is there a way I can get worker pools (and workers) working like Deployment Targets (where I can swap them out as needed)?