Hi there, I am trying to create an AWS CDK construct for setting up a kubernetes cluster that is running the helm chart for the container-agent that is running tasks.
We are wondering if it is somehow possible to pass in environment variables into the tasks that run our CircleCI jobs from the helm config?
const circleCiRunnerHelm = this.cluster.addHelmChart('CircleCiRunner', {
chart: 'container-agent',
repository: 'https://packagecloud.io/circleci/container-agent/helm',
namespace,
release: 'container-agent',
values: {
agent: {
serviceContainers: {
prefix: {
"cimg/ruby": {
env: [
{
name: 'FOO',
value: 'bar',
},
],
},
},
},
resourceClasses: {
[`sofatutor/${dasherize(env.appName)}`]: {
token: process.env.CIRCLECI_RUNNER_TOKEN,
},
},
},
serviceAccount: {
create: false,
name: circleCiServiceAccount.serviceAccountName,
},
nodeSelector: {
'eks.amazonaws.com/compute-type': 'ec2',
},
},
});
While this can successfully be applied, the env vars unfortunately will not show up in the job. Unfortunately this is undocumented, but it would be very convenient if it would be possible, so we don’t have to manually set AWS specific env vars via the config.yml or the CirlceCI UI.
Thanks in advance for your help.