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

dl.k8s.io: Redirect CI URIs to Kubernetes Community infra #1857

Merged
merged 2 commits into from
Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion k8s.io/configmap-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ data:
# Don't require /release/ if you want to get at the Kubernetes release artifacts, the common case.
rewrite ^/(v[0-9]+\.[0-9]+\.[0-9]+(-(alpha|beta|rc)\.[0-9]+)?/.*)$ https://storage.googleapis.com/kubernetes-release/release/$1 redirect;
# Provide a convenient redirect for CI (continuous integration) artifacts as well, which live in a different bucket.
rewrite ^/ci(-cross)?/?(.*)$ https://storage.googleapis.com/kubernetes-release-dev/ci$1/$2 redirect;
rewrite ^/ci/?(.*)$ https://storage.googleapis.com/k8s-release-dev/ci$1/$2 redirect;
Copy link
Member

@spiffxp spiffxp Jul 3, 2021

Choose a reason for hiding this comment

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

Two things I noticed when trying to deploy:

Fixup PR inbound

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahhh, regex, my old enemy.
Thanks for the cleanup, Aaron.

I'll fixup the k/release references.

Copy link
Member

Choose a reason for hiding this comment

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

Opened #2292

Copy link
Member Author

Choose a reason for hiding this comment

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

* `ci-cross` is still referenced here, and cutting .debs may be broken until this code is fixed: https://github.com/kubernetes/release/blob/6e3b30b6dd78b705474a1086f2ed7f7b8364029b/packages/deb/build.go#L291-L302

Fixed in kubernetes/release#2153.

rewrite ^/(.*)$ https://storage.googleapis.com/kubernetes-release/$1 redirect;
}
}
Expand Down
8 changes: 2 additions & 6 deletions k8s.io/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,12 @@ def test_dl(self):
# A few /ci/ tests
self.assert_temp_redirect(
base + '/ci/v$ver/$path',
'https://storage.googleapis.com/kubernetes-release-dev/ci/v$ver/$path',
'https://storage.googleapis.com/k8s-release-dev/ci/v$ver/$path',
ver=rand_num(), path=rand_num())
self.assert_temp_redirect(
base + '/ci/latest-$ver.txt',
'https://storage.googleapis.com/kubernetes-release-dev/ci/latest-$ver.txt',
'https://storage.googleapis.com/k8s-release-dev/ci/latest-$ver.txt',
ver=rand_num())
self.assert_temp_redirect(
base + '/ci-cross/v$ver/$path',
'https://storage.googleapis.com/kubernetes-release-dev/ci-cross/v$ver/$path',
ver=rand_num(), path=rand_num())
# Base case
self.assert_temp_redirect(
base + '/$path',
Expand Down