Bug 1972009: Implementing CredentialStoreFactory - #1109
openshift-merge-robot merged 3 commits into
Conversation
When fetching an image we may need to use different authentications as, in some cases, we are accessing mirrors instead of the original repo.
|
/assign @dmage Could you please take an initial look into this one? |
| creds := c.Credentials | ||
| if c.CredentialsFactory != nil { | ||
| creds = c.CredentialsFactory.CredentialStoreFor(ref.AsRepository().String()) | ||
| } |
There was a problem hiding this comment.
you need to rework cachedTransports so that it respects new credentials
There was a problem hiding this comment.
I don't think I need to refactor it. Scopes (repository and operation) and the registry host are taken into account when evaluating if we are going to reuse or not a transport. In any case I have developed an unit test where I assure we are trying the right authentications even when mirror from one repository into another inside the same registry. Is there any corner case you see this failing? ptal.
Assure we are not reusing the same transport when fetching two distinct repositories inside the same registry.
|
@ricardomaraschini: This pull request references Bugzilla bug 1972009, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/lgtm |
|
/approved |
|
@sttts you have a typo in the command |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dmage, ricardomaraschini, sttts The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@ricardomaraschini: Some pull requests linked via external trackers have merged: The following pull requests linked via external trackers have not merged:
These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state. Once unlinked, request a bug refresh with Bugzilla bug 1972009 has not been moved to the MODIFIED state. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/cherrypick release-4.8 |
|
@dmage: new pull request created: #1225 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Registry client supports Alternates (mirrors) since #1084. As mirrors most likely use different credentials to authenticate we need a way of getting these mirror credentials based in the image path.