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

Support pass environment to build pod container #1729

Open
zhoufenqin opened this issue Oct 11, 2024 · 2 comments
Open

Support pass environment to build pod container #1729

zhoufenqin opened this issue Oct 11, 2024 · 2 comments

Comments

@zhoufenqin
Copy link

We need to pass some enviroment into build pod initcontainer

For example, it will VerifyWriteAccess in build-init initcontainer or validating registry read access in analyzer initcontainer, similar validate operations exist in export/compeletion containers

we use azure container registry, and use managed identity to pull/push image, if there are multiple managed identity exist in azure kubenetes, we need to pass environment like "AZURE_CLIENT_ID" to specify one of them, other wise, it will fail to get token and validate failed.

But I can only configure cnbimage, kpack-controller will trigger buildpod, I can't pass environments to build-init initcontainer

Can you support this kind of features?

@zhoufenqin zhoufenqin changed the title Support pass environment to build pod inticontainer Support pass environment to build pod container Oct 11, 2024
@chenbh
Copy link
Contributor

chenbh commented Oct 18, 2024

  1. Are you mainly interested in using these env vars in the build pod (i.e. only with the Image and Build CR), or do you see a need for this to work with the images pushed by the controller (i.e. Buildpack, Builder, ClusterStack)? The latter is a lot more complicated to implement because the controller parallelizes reconciliation of Builders and env vars are shared all goroutines.

  2. How granular do you need it to be? Should it be one client ID per Image/Build CR, or one client ID per registry host (i.e. my-corp.azurecr.io)?

@zhoufenqin
Copy link
Author

Hi @chenbh

  1. I'm interested in using the env var in build pod, and the client_id will be used in multiple container, like prepare/build/expoert/completion containers and so on, when operate with container registry, it need a client_id
  2. per image/build CR need a client_id, not per registry host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants