Skip to content

Develop and confirm method for connecting agentk to canary kas

Once we have a version of KAS running in canary (#2554 (closed)) and have a haproxy setup to route traffic to the canary instance of KAS (#1547 (closed)), we need to make sure that it's possible to configure agentk in someway so that it will always connect to the canary instance of kas.

Instead of relying on dns names (canary.kas.gitlab.com) we are instead going to use cookie based routing in haproxy, meaning any requests with gitlab_canary=true cookie will be routed to the canary stage of KAS, and if the cookie is set to gitlab_canary=false (or absent), it will be routed to the main stage.

This means we need to add code to agentk, so that in the configuration of agentk, we can define if we want to connect to the canary stage of kas or not, and then if the configuration is set, then all requests to kas have the cookie gitlab_canary=true set. This will allow quality to make the QA suites for gstg-cny and gprd-cny configure their agentk to connect to the canary stage (thus test the new kas code as part of the auto-deploy)

Exit Criteria

/cc @gitlab-org/configure

Edited by Graeme Gillies