Skip to content

Ignore docker config if it's a directory#1420

Merged
imjasonh merged 1 commit intogoogle:mainfrom
lcarva:handle-dir-k8schain
Jul 28, 2022
Merged

Ignore docker config if it's a directory#1420
imjasonh merged 1 commit intogoogle:mainfrom
lcarva:handle-dir-k8schain

Conversation

@lcarva
Copy link
Copy Markdown
Contributor

@lcarva lcarva commented Jul 27, 2022

In a kubernetes environment, a volume from a Secret can be optionally
mounted. If the Secret does not exist, the mounted path is always a
directory.

This change modifies auth.DefaultKeychain to ignore the case where the
docker config file is unexpectedly a directory.

Signed-off-by: Luiz Carvalho lucarval@redhat.com

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Jul 27, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Contributor

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread pkg/authn/keychain_test.go Outdated
Comment thread pkg/authn/keychain_test.go Outdated
In a kubernetes environment, a volume from a Secret can be optionally
mounted. If the Secret does not exist, the mounted path is always a
directory.

This change modifies auth.DefaultKeychain to ignore the case where the
docker config file is unexpectedly a directory.

Signed-off-by: Luiz Carvalho <lucarval@redhat.com>
@imjasonh imjasonh merged commit 24a1c33 into google:main Jul 28, 2022
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

Successfully merging this pull request may close these issues.

2 participants