Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
bba65e8a
Commit
bba65e8a
authored
Mar 05, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18134 from feihujiang/markGenericTopLevelPrefixProxyDeprecated
Auto commit by PR queue bot
parents
6d9e0ed0
892e3a34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
api_installer.go
pkg/apiserver/api_installer.go
+11
-0
No files found.
pkg/apiserver/api_installer.go
View file @
bba65e8a
...
...
@@ -366,7 +366,11 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
actions
=
appendIf
(
actions
,
action
{
"PATCH"
,
itemPath
,
nameParams
,
namer
},
isPatcher
)
actions
=
appendIf
(
actions
,
action
{
"DELETE"
,
itemPath
,
nameParams
,
namer
},
isDeleter
)
actions
=
appendIf
(
actions
,
action
{
"WATCH"
,
"watch/"
+
itemPath
,
nameParams
,
namer
},
isWatcher
)
// We add "proxy" subresource to remove the need for the generic top level prefix proxy.
// The generic top level prefix proxy is deprecated in v1.2, and will be removed in 1.3, or 1.4 at the latest.
// TODO: DEPRECATED in v1.2.
actions
=
appendIf
(
actions
,
action
{
"PROXY"
,
"proxy/"
+
itemPath
+
"/{path:*}"
,
proxyParams
,
namer
},
isRedirector
)
// TODO: DEPRECATED in v1.2.
actions
=
appendIf
(
actions
,
action
{
"PROXY"
,
"proxy/"
+
itemPath
,
nameParams
,
namer
},
isRedirector
)
actions
=
appendIf
(
actions
,
action
{
"CONNECT"
,
itemPath
,
nameParams
,
namer
},
isConnecter
)
actions
=
appendIf
(
actions
,
action
{
"CONNECT"
,
itemPath
+
"/{path:*}"
,
proxyParams
,
namer
},
isConnecter
&&
connectSubpath
)
...
...
@@ -406,7 +410,11 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
actions
=
appendIf
(
actions
,
action
{
"PATCH"
,
itemPath
,
nameParams
,
namer
},
isPatcher
)
actions
=
appendIf
(
actions
,
action
{
"DELETE"
,
itemPath
,
nameParams
,
namer
},
isDeleter
)
actions
=
appendIf
(
actions
,
action
{
"WATCH"
,
"watch/"
+
itemPath
,
nameParams
,
namer
},
isWatcher
)
// We add "proxy" subresource to remove the need for the generic top level prefix proxy.
// The generic top level prefix proxy is deprecated in v1.2, and will be removed in 1.3, or 1.4 at the latest.
// TODO: DEPRECATED in v1.2.
actions
=
appendIf
(
actions
,
action
{
"PROXY"
,
"proxy/"
+
itemPath
+
"/{path:*}"
,
proxyParams
,
namer
},
isRedirector
)
// TODO: DEPRECATED in v1.2.
actions
=
appendIf
(
actions
,
action
{
"PROXY"
,
"proxy/"
+
itemPath
,
nameParams
,
namer
},
isRedirector
)
actions
=
appendIf
(
actions
,
action
{
"CONNECT"
,
itemPath
,
nameParams
,
namer
},
isConnecter
)
actions
=
appendIf
(
actions
,
action
{
"CONNECT"
,
itemPath
+
"/{path:*}"
,
proxyParams
,
namer
},
isConnecter
&&
connectSubpath
)
...
...
@@ -652,6 +660,9 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
}
addParams
(
route
,
action
.
Params
)
ws
.
Route
(
route
)
// We add "proxy" subresource to remove the need for the generic top level prefix proxy.
// The generic top level prefix proxy is deprecated in v1.2, and will be removed in 1.3, or 1.4 at the latest.
// TODO: DEPRECATED in v1.2.
case
"PROXY"
:
// Proxy requests to a resource.
// Accept all methods as per http://issue.k8s.io/3996
addProxyRoute
(
ws
,
"GET"
,
a
.
prefix
,
action
.
Path
,
proxyHandler
,
namespaced
,
kind
,
resource
,
subresource
,
hasSubresource
,
action
.
Params
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment