Skip to content

Move from bit.ly URLs to rel.k8s.io for the release team #8109

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
32 changes: 30 additions & 2 deletions apps/k8s-io/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ Vanity URL(s)

NOTE: please see k8s.io/k8s.io/configmap-nginx.yaml for `server` definitions

Redirections
====
# Redirections

## go.k8s.io Redirects
- https://go.k8s.io/api-review
- https://go.k8s.io/bot-commands
- https://go.k8s.io/calendar
Expand Down Expand Up @@ -67,6 +68,33 @@ Redirections
- https://go.k8s.io/contact/wg-lts
- https://go.k8s.io/contact/committee-steering

## rel.k8s.io Redirects

### Direct Redirects
- https://rel.k8s.io/ → https://github.com/kubernetes/kubernetes/releases
- https://rel.k8s.io/k8s-release-cal → https://calendar.google.com/calendar/embed?src=kipmnllvl17vl9m98jen6ujcrs%40group.calendar.google.com
- https://rel.k8s.io/k8s-sig-release-videos → https://youtube.com/playlist?list=PL69nYSiGNLP3QKkOsDsO6A0Y1rhgP84iZ&si=Mi095CYuJuz8LjN-

### Version-specific Redirects

#### For versions ≤1.33:
Historical version-specific URLs follow this pattern:
- https://rel.k8s.io/v1XX/{keyword} → https://bit.ly/k8s1XX-{keyword}

Examples include:
- https://rel.k8s.io/v133/enhancements → https://bit.ly/k8s133-enhancements
- https://rel.k8s.io/v133/bugtriage → https://bit.ly/k8s133-bugtriage
- https://rel.k8s.io/v133/cisignal → https://bit.ly/k8s133-cisignal

Other common patterns that have been moved to the direct bit.ly redirects:
- https://rel.k8s.io/v1XX/releasemtg
- https://rel.k8s.io/v1XX/retro
- https://rel.k8s.io/v1XX/contacts (Note: Access is restricted through Google Authorization)

#### For versions >1.33:
For all release versions after v1.33, URLs follow this pattern:
- https://rel.k8s.io/v1XX/{keyword} → https://github.com/kubernetes/sig-release/tree/master/releases/release-1.XX/links.md#{keyword}


NOTE: please see configmap-nginx.yaml for rewrite rules.

Expand Down
21 changes: 19 additions & 2 deletions apps/k8s-io/configmap-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,25 @@ data:
listen 80;

location / {
rewrite ^/$ https://github.com/kubernetes/kubernetes/releases redirect;
rewrite ^/([^/]*)(/.*)?$ https://github.com/kubernetes/kubernetes/tree/$1$2 redirect;
# Special case for versions up to v1.33 - redirect to bit.ly
if ($uri ~ "^/v([0-9])([0-9]+)/([a-zA-Z]+)$") {
set $major $1;
set $minor $2;
set $remaining $3;

# For versions <=1.33, redirect to bit.ly
if ($major = "1" && $minor <= "33") {
return 301 https://bit.ly/k8s$major$minor-$remaining;
}

# For versions >1.33, redirect to links.md in kubernetes/sig-release repo
return 301 https://github.com/kubernetes/sig-release/tree/master/releases/release-$major.$minor/links.md#$remaining;
}

rewrite ^/$ https://github.com/kubernetes/kubernetes/releases redirect;
rewrite ^/k8s-release-cal https://calendar.google.com/calendar/embed?src=kipmnllvl17vl9m98jen6ujcrs%40group.calendar.google.com redirect;
rewrite ^/k8s-sig-release-videos https://youtube.com/playlist?list=PL69nYSiGNLP3QKkOsDsO6A0Y1rhgP84iZ&si=Mi095CYuJuz8LjN- redirect;
rewrite ^/([^/]*)(/.*)?$ https://github.com/kubernetes/kubernetes/tree/$1$2 redirect;
}
}

Expand Down