[bug] gitlab script tests failing regularly in umbrella tests due to inability to access kubeapi from within the test container
Overview
Those gitlab script tests I wrote a few months back for #233 (closed) are failing regularly at the umbrella chart test level due to an inability to access the kubernetes API in the kubectl exec toolbox rails runner make me a new gitlab PAT
phase of scripts/test.sh
.
Potential fixes
- Rewrite
test.sh
to only runcurl
commands that can work without a PAT (i.e. read-only tests that don't require login) - Generate a viable
KUBECONFIG
inside the test.sh script (prior art by @andrewshoell below) - Generate the test PAT before the
gitlab-script-test
container executesscripts/test.sh
. Could be done in anInitContainer
within thegitlab-script-test
pod or possibly as a post-install pre-testJob
hook that creates the needed PAT and then stores it somewhere the gluon scripts test container can see it (k8sSecret
or a short-lived volume mount)