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: static credentials provider #3

Merged
merged 3 commits into from
Nov 10, 2022

Conversation

dkoshkin
Copy link
Contributor

@dkoshkin dkoshkin commented Nov 10, 2022

Initial implementation, adding the scaffolding and simple functionality where it just reads a file and returns it to stdout.

Tested the plugin with:

$ echo '{"kind":"CredentialProviderResponse","apiVersion":"credentialprovider.kubelet.k8s.io/v1alpha1","cacheKeyType":"Registry","cacheDuration":"10m0s","auth":{"*.registry.io":{"username":"user","password":"password"}}}' > /tmp/image-credentials.json
$ echo '{"kind":"CredentialProviderRequest","apiVersion":"credentialprovider.kubelet.k8s.io/v1alpha1","image":"test.registry.io/foobar"}' | ./dist/static-credential-provider_$(go env GOOS)_$(go env GOARCH)_v1/static-credential-provider /tmp/image-credentials.json
{"kind":"CredentialProviderResponse","apiVersion":"credentialprovider.kubelet.k8s.io/v1alpha1","cacheKeyType":"Registry","cacheDuration":"10m0s","auth":{"*.registry.io":{"username":"user","password":"password"}}}

And the installer:

$ docker run -e CREDENTIAL_PROVIDER_TARGET_DIR=/tmp -v $(pwd)/tmp:/tmp mesosphere/kubelet-image-credential-provider-installer:v0.1.0-dev
time="2022-11-10T01:32:37Z" level=info msg="Installed /tmp/acr-credential-provider"
time="2022-11-10T01:32:37Z" level=info msg="Installed /tmp/ecr-credential-provider"
time="2022-11-10T01:32:38Z" level=info msg="Installed /tmp/static-credential-provider"
time="2022-11-10T01:32:38Z" level=info msg="Wrote credential provider binaries to /tmp\n"

@dkoshkin dkoshkin requested a review from jimmidyson November 10, 2022 01:02
@dkoshkin dkoshkin force-pushed the dkoshkin/feat-static-credentials-provider branch 3 times, most recently from 3cf6528 to f251b5f Compare November 10, 2022 01:22
@github-actions github-actions bot added feature and removed feature labels Nov 10, 2022
Initial implementation, adding the scaffolding and simple functionality where it just reads a file and returns it to stdout.
@jimmidyson jimmidyson force-pushed the dkoshkin/feat-static-credentials-provider branch from f251b5f to 79236f3 Compare November 10, 2022 09:02
@jimmidyson jimmidyson enabled auto-merge (squash) November 10, 2022 10:12
@jimmidyson jimmidyson merged commit d7640c9 into main Nov 10, 2022
@jimmidyson jimmidyson deleted the dkoshkin/feat-static-credentials-provider branch November 10, 2022 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants