-
Notifications
You must be signed in to change notification settings - Fork 85
Add proxy-cache-registry-head-calls.md #261
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: mxmtr <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Thomas Coudert <[email protected]> Signed-off-by: mxmtr <[email protected]>
2. Define its lifetime to a value that would prevent rate limiting from being triggered (10s?) in the [proxy-controller](https://github.com/goharbor/harbor/blob/bfc29904f96e17248a4e6204d12058c1d7d05ab8/src/controller/proxy/controller.go#L41-L48) | ||
|
||
```golang | ||
manifestExistsCacheInterval = 10 * time.Second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Maxime, by given such internal, there would be a a chance the client will pull different artifacts with the same binary from the source repo, if your pipeline is using this, you will have different testing results depending on when you run the tests. Such ambiguity will lead to difficulty when you trouble-shooting some issues. In my opinion, we should encourage the user to use sha digest instead of tag to reduce the API calling number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed the best practice is to use the sha digest, unfortunately some big open source projects (rancher for example) use hundreds of images from various origins and only allow the user to specify repository proxy urls, this proposal was made to ensure we don't send a HEAD request every time we pull an artifact.
The risk of pulling different artifacts using a tag exists indeed, maybe this behavior could be configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Maxime, I don't know how to make it configurable, but we should highlight to the users about the possibility of pulling different binaries in different time, thanks.
No description provided.