forked from kubernetes-sigs/kubebuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netlify.toml
153 lines (130 loc) · 4.53 KB
/
netlify.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[build]
base = "docs/book"
command = "GO_VERSION=1.20 ./install-and-build.sh"
publish = "docs/book/book"
functions = "docs/book/functions"
# TODO(directxman12): I don't know why, but this (functions) stanza is in the
# docs and local `netlify dev`, but the above one (under build) is used by the
# online version :-/
# used to handle the split between v2 and v3+ download links
[functions]
# relative to base directory
directory = "functions"
# Standard Netlify redirects
[[redirects]]
from = "https://kubebuilder.netlify.com/*"
to = "https://book.kubebuilder.io/:splat"
status = 301
force = true
# HTTP-to-HTTPS rules
[[redirects]]
from = "http://go.kubebuilder.io/*"
to = "https://go.kubebuilder.io/:splat"
status = 301
force = true
[[redirects]]
from = "http://kubebuilder.netlify.com/*"
to = "http://book.kubebuilder.io/:splat"
status = 301
force = true
# kubebuilder binary (v3+) and tarball (< v3) redirects.
[[redirects]]
from = "https://go.kubebuilder.io/dl/*"
to = "https://go.kubebuilder.io/releases/:splat"
status = 301
force = true
[[redirects]]
from = "https://go.kubebuilder.io/releases"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases"
status = 302
force = true
# Development branch redirect.
[[redirects]]
from = "https://go.kubebuilder.io/releases/master/:os/:arch"
to = "https://storage.googleapis.com/kubebuilder-release/kubebuilder_master_:os_:arch.tar.gz"
status = 302
force = true
# Latest redirects.
[[redirects]]
from = "https://go.kubebuilder.io/releases/latest"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/latest"
status = 302
force = true
[[redirects]]
from = "https://go.kubebuilder.io/releases/latest/:os"
to = "https://go.kubebuilder.io/releases/latest/:os/amd64"
status = 302
force = true
[[redirects]]
from = "https://go.kubebuilder.io/releases/latest/:os/:arch"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/latest/download/kubebuilder_:os_:arch"
status = 302
force = true
# general release redirects
[[redirects]]
from = "https://go.kubebuilder.io/releases/:version"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/v:version"
status = 302
force = true
[[redirects]]
from = "https://go.kubebuilder.io/releases/:version/:os"
to = "https://go.kubebuilder.io/releases/:version/:os/amd64"
status = 302
force = true
# release download redirect
[[redirects]]
from = "https://go.kubebuilder.io/releases/:version/:os/:arch"
# I don't quite know why, but netlify (or at least the dev mode) *insists*
# on eating every other query parameter, so just use paths instead
to = "/.netlify/functions/handle-version/releases/:version/:os/:arch"
# 200 --> don't redirect to the function then to whereever it says,
# just pretend like the function is mounted directly here
status = 200
force = true
# Tools redirects.
[[redirects]]
from = "https://go.kubebuilder.io/test-tools"
to = "https://storage.googleapis.com/kubebuilder-tools"
status = 302
force = true
[[redirects]]
from = "https://go.kubebuilder.io/test-tools/:k8sversion"
to = "https://storage.googleapis.com/kubebuilder-tools/?prefix=kubebuilder-tools-:k8sversion"
status = 302
force = true
[[redirects]]
from = "https://go.kubebuilder.io/test-tools/:k8sversion/:os"
to = "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-:k8sversion-:os-amd64.tar.gz"
status = 302
force = true
[[redirects]]
from = "https://go.kubebuilder.io/test-tools/:k8sversion/:os/:arch"
to = "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-:k8sversion-:os-:arch.tar.gz"
status = 302
force = true
# Image redirects.
[[redirects]]
from = "https://go.kubebuilder.io/images"
to = "gcr.io/kubebuilder"
status = 302
force = true
[[redirects]]
from = "https://go.kubebuilder.io/images/:os"
to = "https://go.kubebuilder.io/images/:os/amd64"
status = 302
force = true
[[redirects]]
from = "https://go.kubebuilder.io/images/:os/:arch"
to = "gcr.io/kubebuilder/thirdparty-:os-:arch"
status = 302
force = true
[[redirects]]
from = "https://go.kubebuilder.io/images/:os/:arch/:k8sversion"
to = "gcr.io/kubebuilder/thirdparty-:os-:arch::k8sversion"
status = 302
force = true
# custom 404 handling -- this may need to be last -- netlify docs are unclear
[[redirects]]
from = "/*"
to = "/404.html"
status = 404