Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(image-builder): Add mechanism to pass api server env vars to kaniko build jobs #398

Conversation

deadlycoconuts
Copy link
Contributor

Context

Similar to what had been performed for Merlin in this PR caraml-dev/merlin#621, this PR introduces a new mechanism for environment variables from the Turing API server to be propagated to the build environment of the Kaniko build jobs that it spins up, reducing the need for redundant repetition of configuration, especially if these environment variables are common to both the Turing API server and the build environment of the Kaniko build jobs.

Since these variables are passed to the Kaniko build jobs as build arguments (as opposed to environment variables of the container where the image gets built; see GoogleContainerTools/kaniko#2824 for more details), these variables get passed as additional arguments in the Kaniko build job.

Modifications

  • api/turing/config/config.go - Addition of configs to specify environment variables to pass from the Turing API server to the Kaniko job
  • api/turing/imagebuilder/imagebuilder.go - Addition of a step to add Turing API server environment variables as Kaniko build args

@deadlycoconuts deadlycoconuts added the enhancement New feature or request label Jan 2, 2025
@deadlycoconuts deadlycoconuts self-assigned this Jan 2, 2025
api/turing/config/config.go Outdated Show resolved Hide resolved
@deadlycoconuts
Copy link
Contributor Author

Thanks a lot for the quick review! Merging this now!

@deadlycoconuts deadlycoconuts merged commit 47ba388 into caraml-dev:main Jan 2, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants