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

HEAD check and fallback if S3 is missing layers #66

Merged
merged 1 commit into from Apr 26, 2022

Conversation

BenTheElder
Copy link
Member

@BenTheElder BenTheElder commented Apr 26, 2022

The test bucket we have is a one-off sync and cannot be guaranteed to have all layers present.

This caused issues with our test job right after implementing redirect-to-s3 when kops started using an image we didn't have synced into the test s3 bucket.
https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/e2e-kops-grid-gcr-mirror-canary/1517823558204526592

... so for the sake of development, I implemented checking if the layer actually exists.

Each AWS bucket can handle 5,500s HEAD RPS without sharding the bucket key prefix, if we need more we can implement key prefix, or we can institute caching in the OCI proxy. There appears to be no client rate limit, just the bucket scaling.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/optimizing-performance.html

If for any reason we can't verify that the blob is available, we simply fall back to redirecting GCR.
This logic only impacts the AWS-client serving path, and AWS clients already get the benefit of moving to being served a local copy when we roll this out, which should be a net-win.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 26, 2022
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 26, 2022
@dims
Copy link
Member

dims commented Apr 26, 2022

/approve
/lgtm

thanks @BenTheElder !

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, dims

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 26, 2022
@k8s-ci-robot k8s-ci-robot merged commit 8727db0 into kubernetes:main Apr 26, 2022
@BenTheElder BenTheElder deleted the HEAD-check branch April 26, 2022 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants