I followed container-runner docs to deploy (via Helm) a container agent. I created a resource class and noted the token in the WebUI. I created a values.yaml
with the following content (scrubbed).
# values.yaml
---
resourceClasses:
namespace/my-rc:
token: MY_TOKEN
Helm deploy shows success:
helm install -f values.yaml container-agent circleci/container-agent -n circleci
However, pod logs show WARN: Missing API Key.
. I’ve exec’d into the container and checked out the contents for /etc/container-agent/config.yaml
and it shows the following. I don’t see anything representing my resource class and token.
# /etc/container-agent/config.yaml
resourceClasses:
Digging a bit more I think the deployment’s init container is doing some work to prep a config.yaml
via the taskpod-config
volume. It’s merging the config map container-agent
with the secret container-agent
. Values for both of these in my setup are equal to resourceClasses:
. resourceClasses:
is written to config.yaml
and copied to the volume taskpod-config
which is then mounted to /etc/container-agent/config.yaml
in the container-agent container.
In an attempt to just make it work I updated config.yaml
with the contents of my values.yaml
and while exec’d into the pod ran kill 1; ./container-agent
. The container-agent registered and can now successfully run jobs.