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

imgpkg should support iaas pre-authed registries when running on preconfigured vms/cointainers #202

Closed
cppforlife opened this issue Jul 28, 2021 · 4 comments
Labels
carvel accepted This issue should be considered for future work and that the triage process has been completed enhancement This issue is a feature request priority/important-soon Must be staffed and worked on currently or soon

Comments

@cppforlife
Copy link
Contributor

cppforlife commented Jul 28, 2021

Describe the problem/challenge you have

context: iaas provides (aws, gcp, azure...) have registries that could be made accessible (can auth to) on iaas provided vms via iaas metadata channel (e.g. gke cluster can be allowed to pull content from private gcr).

use case: kapp-controller users want to use iaas provided registry on their kubernetes cluster (cluster is preauthenticated to that registry). since kc runs imgpkg within its controller pod on a iaas provided vm, it should be able to authenticate to iaas provided registry without users having to provide additional credentials.

it should still be possible for imgpkg to be configured with additional credentials but it should also be smart enough to use "iaas registry provided creds" where applicable.

Describe the solution you'd like

imgpkg does not require any additional configuration and just knows when to use additional creds if available.

Anything else you would like to add:


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@cppforlife cppforlife added enhancement This issue is a feature request carvel triage This issue has not yet been reviewed for validity labels Jul 28, 2021
@DennisDenuto
Copy link
Contributor

DennisDenuto commented Aug 16, 2021

@cppforlife

This looks like a great improvement to imgpkg.

My initial thought is, having an implicit auth mechanism (i.e. configuring imgpkg keychain based on IAAS metadata) adds complexity to the UX specifically around auth (there are currently already multiple ways to provide auth to imgpkg, with a defined priority of which auth mechanism is used when there is overlap).

I'm wondering if we can leverage the already set ways to provide auth to imgpkg. Specifically via env vars

What are your thoughts around providing a helper command imgpkg print-iaas-envs that could render out the export IMGPKG_REGISTRY_HOSTNAME_0 for the consumer to eval. Based on my high level understanding, the IAAS metadata provides dockerconfig files. Sooo I think this should be possible.

@DennisDenuto DennisDenuto added triage/needs-more-information priority/important-soon Must be staffed and worked on currently or soon and removed carvel triage This issue has not yet been reviewed for validity labels Aug 16, 2021
@cppforlife
Copy link
Contributor Author

What are your thoughts around providing a helper command imgpkg print-iaas-envs

im -1 on pushing such logic to clients, since clients have no idea what is possible and not possible. e.g. kapp controller has no idea whether it's running on aws/gcp/etc.

the IAAS metadata provides dockerconfig files.

not sure if that's true (i thought they were dealing with tokens directly), but that's something that only imgpkg could know about.

@DennisDenuto
Copy link
Contributor

since clients have no idea what is possible and not possible

True, the client might not know it is running on an IaaS. In that case the client could always just run eval $(imgpkg print-iaas-envs) and essentially no-op.

However, I do think the above does adds a potentially unnecessary step.

Another reason to have an implicit auth mechanism (and not inject via env variables) would be credential rotation. Specifically, in a long-running environment, if the IaaS creds are rotated, then having imgpkg access the latest creds via metadata service is obviously preferred (and not needing to run the print-iaas-env command before every invocation - just in case).

Also, from an engineering perspective, it will require less effort to just use the k8s_keychain provided by ggcr.

I'm going to accept and prioritize this issue :-)

@DennisDenuto
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
carvel accepted This issue should be considered for future work and that the triage process has been completed enhancement This issue is a feature request priority/important-soon Must be staffed and worked on currently or soon
Projects
None yet
Development

No branches or pull requests

2 participants