Skip to content

Use registry host to get ACR access token and add new OIDCLogin function#572

Merged
darkowlzz merged 3 commits intomainfrom
generic-oicd-auth
May 25, 2023
Merged

Use registry host to get ACR access token and add new OIDCLogin function#572
darkowlzz merged 3 commits intomainfrom
generic-oicd-auth

Conversation

@darkowlzz
Copy link
Copy Markdown
Contributor

… registry url.

This commits removes the code that parses the region from the ecr registry and uses it to set the config.
By default, LoadDefaultConfig will get the region of the instance from the metadata service which is the
correct region that should be used when requesting for a token.

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
… ref argument

The Login function in oci/auth no longer uses the name.Reference argument and instead
gets the registry host from the image argument and passes that to the Login method of
the different region. This is to allow login to consumers of this function that don't
have a repository name and just a registry host.

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
It also updates the Makefile to build the testapp for linux/amd64
by default. This can be changed by setting GOARCH and GOOS variables.

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
@darkowlzz darkowlzz added the area/oci OCI related issues and pull requests label May 25, 2023
@darkowlzz darkowlzz requested a review from stefanprodan as a code owner May 25, 2023 17:23
Copy link
Copy Markdown
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@darkowlzz darkowlzz merged commit 748d181 into main May 25, 2023
@darkowlzz darkowlzz deleted the generic-oicd-auth branch May 25, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/oci OCI related issues and pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants