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

setup proxy cache to Google Artifact registry is failing #20682

Open
vinay1203 opened this issue Jul 1, 2024 · 4 comments
Open

setup proxy cache to Google Artifact registry is failing #20682

vinay1203 opened this issue Jul 1, 2024 · 4 comments
Assignees
Labels
area/proxy-cache kind/requirement New feature or idea on top of harbor

Comments

@vinay1203
Copy link

I have installed harbor and setup ingress and added a proxy registry with Google GCR provider but with Artifact registry as the Endpoint URL(https://us-docker.pkg.dev/<GCP_PROJECT>).

But when i am trying to pull from the harbor endpoint, it is giving the below error.
Error response from daemon: unknown: repository proxy-cache/prod-docker-us/hello-world not found

Docker login works and i am using the command in the format as below:
docker pull <HARBOR_ENDPOINT>/<HARBOR_PROJECT_NAME>/<GAR_REPO_NAME>/hello-world:latest

And i was able to pull the image from GAR successfully using Google Artifact Registry endpoint.

After checking the harbor-core pod logs, i could see the below logs:
2024-07-01T19:43:19Z [ERROR] [/server/middleware/repoproxy/proxy.go:121]: failed to proxy manifest, fallback to local, request uri: /v2/proxy-cache/hello-world/manifests/latest, error: http status code: 405, body:

@stonezdj
Copy link
Contributor

stonezdj commented Jul 8, 2024

The google container registry (GCR) is different with the google artifact registry (GAR), you can not use the GCR provider for a GAR endpoint.

@wy65701436 wy65701436 added kind/requirement New feature or idea on top of harbor area/proxy-cache labels Jul 8, 2024
@vinay1203
Copy link
Author

vinay1203 commented Jul 16, 2024

So, GAR proxy is not currently supported by Harbor?

I used GCR provider with GAR endpoint with reference to the comment in the below PR. #16973 (comment)

I also tried GAR endpoint with docker registry provider as well. It is also failing with the same error.

I am using harbor core image version of v2.10.2

@Kenny1G
Copy link

Kenny1G commented Jul 16, 2024

So, GAR proxy is not currently supported by Harbor?

I used GCR provider with GAR endpoint with reference to the comment in the below PR. #16973 (comment)

I also tried GAR endpoint with docker registry provider as well. It is also failing with the same error.

I am using harbor core image version of v2.10.2

@vinay1203 You want to configure the replication endpoint in this way: #16973 (comment)

@vinay1203
Copy link
Author

Hello @Kenny1G

Thank you for your response. I did follow the same PR but while creating a registry and giving Endpoint URL as "https://us-docker.pkg.dev" it is not letting me create the registry stating "the registry is unhealthy".

Upon checking harbor core logs, i can see the below errors:
2024-07-16T17:58:52Z [ERROR] [/pkg/reg/adapter/native/adapter.go:126]: failed to ping registry https://us-docker.pkg.dev: http status code: 401, body: {"errors":[{"code":"UNAUTHORIZED","message":"authentication failed"}]}

But if i add my project at the end of the url like "https://us-docker.pkg.dev/<GCP_PROJECT>" then i am able to create the registry. That is the reason why i used Endpoint URL in that particular format ignoring the comment in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/proxy-cache kind/requirement New feature or idea on top of harbor
4 participants