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
-
agentk
has a configuration option to make it connect to canary stage - gitlab-org/cluster-integration/gitlab-agent#311 (closed) -
kpt installation of agentk allows us to set this configuration if needed - already supported -
helm installation of agentk allows us to set this configuration if needed - gitlab-org/charts/gitlab-agent#18 (closed) -
agentk with canary configuration set, is confirmed to connect to KAS pods running in canary (gstg) -
agentk with canary configuration set, is confirmed to connect to KAS pods running in canary (prd) -
Dashboards at dashboards.gitlab.net (e.g. https://dashboards.gitlab.net/d/kas-main/kas-overview?orgId=1&var-PROMETHEUS_DS=Global&var-environment=gprd&var-stage=cny) show correct data when stage is set to cny
(for both staging and production environments)