Support url path ending with a wildcard
What does this MR do?
Some Ingress
implementations require path to end with /*
to match an arbitrary URL. This needs to be supported for k8sApiPath setting.
Different Ingress
objects may use different controllers. The global $.Values.global.ingress.path
setting cannot be used in this case. The user (the case with GitLab.com deployment) has to use the individual settting of kas
in this case and set k8sApiPath
to e.g. /k8s-proxy/*
. This is fine except that the same parameter is passed to kas
so that it can check the incoming URL. But it expects only a prefix (can end with /
or not - /
will be added) without a *
at the end. So this MR adds trimSuffix
to remove the *
if it's there.
See https://cloud.google.com/kubernetes-engine/docs/how-to/load-balance-ingress#creating_an_ingress
This wasn't the cause of the incident gitlab-com/gl-infra/production#4948 (closed), but during the investigation I realized that we cannot deploy the current master
of the Chart as is.
Related issues
gitlab-com/gl-infra/delivery#1824 (closed), gitlab-com/gl-infra/k8s-workloads/gitlab-com!963 (merged)
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
Merge Request Title and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added -
Integration tests added to GitLab QA -
Equivalent MR/issue for omnibus-gitlab opened