Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

environment variables don't get injected on init-containers after upgrading to SCDF 2.11.5 #507

@juanpablo-santos

Description

@juanpablo-santos

Hi,

kind of follow-up of #465, after upgrading to SCDF 2.11.5, we've noticed that environment variables aren't translated into the initContainer. Our tasks are launched with

deployer.TASK_NAME.kubernetes.init-container.container-name=batch
deployer.TASK_NAME.kubernetes.init-container.environment-variables=FRAMEWORK_DIR=/shared-libs,CERTIFICATES_DIR=/certificates
deployer.TASK_NAME.kubernetes.init-container.image-name=XXXXX/YYYY:ZZZ
deployer.TASK_NAME.kubernetes.init-container.volume-mounts=[{"name":"vol-shared-libs","mountPath":"/shared-libs"},{"name":"vol-certificates","mountPath":"/certificates"}]

Everything gets translated except the environment-variables bit. We've also tried with

deployer.TASK_NAME.kubernetes.init-container.env=[{"name":"FRAMEWORK_DIR","value":"/shared-dir"},{"name":"CERTIFICATES_DIR","value":"/certificates"}]

obtaining the same result, also using environmentVariables instead of environment-variables. The only way we are now able to pass environmentVariables is by setting the following property

deployer.TASK_NAME.kubernetes.init-containers=[{"container-name":"batch","environmentVariables":["FRAMEWORK_DIR=/shared-dir","CERTIFICATES_DIR=/certificates"],"image-name":"XXXXX/YYYY:ZZZ","volume-mounts":[{"name":"vol-shared-libs","mountPath":"/shared-libs"},{"name":"vol-certificates","mountPath":"/certificates"}]}]

(note that environmentVariables must be used, environment-variables isn't recognized; also, it's weird that deployer.TASK_NAME.kubernetes.init-container.environmentVariables:["FRAMEWORK_DIR=/shared-dir","CERTIFICATES_DIR=/certificates"] doesn't pick up the env vars)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions