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
f501ec65
Commit
f501ec65
authored
Dec 27, 2018
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ValidateProxyRedirects
parent
9e8ab90d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
10 deletions
+2
-10
subresources.go
pkg/registry/core/pod/rest/subresources.go
+1
-1
kube_features.go
staging/src/k8s.io/apiserver/pkg/features/kube_features.go
+0
-8
handler_proxy.go
...src/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy.go
+1
-1
No files found.
pkg/registry/core/pod/rest/subresources.go
View file @
f501ec65
...
@@ -194,7 +194,7 @@ func (r *PortForwardREST) Connect(ctx context.Context, name string, opts runtime
...
@@ -194,7 +194,7 @@ func (r *PortForwardREST) Connect(ctx context.Context, name string, opts runtime
func
newThrottledUpgradeAwareProxyHandler
(
location
*
url
.
URL
,
transport
http
.
RoundTripper
,
wrapTransport
,
upgradeRequired
,
interceptRedirects
bool
,
responder
rest
.
Responder
)
*
proxy
.
UpgradeAwareHandler
{
func
newThrottledUpgradeAwareProxyHandler
(
location
*
url
.
URL
,
transport
http
.
RoundTripper
,
wrapTransport
,
upgradeRequired
,
interceptRedirects
bool
,
responder
rest
.
Responder
)
*
proxy
.
UpgradeAwareHandler
{
handler
:=
proxy
.
NewUpgradeAwareHandler
(
location
,
transport
,
wrapTransport
,
upgradeRequired
,
proxy
.
NewErrorResponder
(
responder
))
handler
:=
proxy
.
NewUpgradeAwareHandler
(
location
,
transport
,
wrapTransport
,
upgradeRequired
,
proxy
.
NewErrorResponder
(
responder
))
handler
.
InterceptRedirects
=
interceptRedirects
&&
utilfeature
.
DefaultFeatureGate
.
Enabled
(
genericfeatures
.
StreamingProxyRedirects
)
handler
.
InterceptRedirects
=
interceptRedirects
&&
utilfeature
.
DefaultFeatureGate
.
Enabled
(
genericfeatures
.
StreamingProxyRedirects
)
handler
.
RequireSameHostRedirects
=
utilfeature
.
DefaultFeatureGate
.
Enabled
(
genericfeatures
.
ValidateProxyRedirects
)
handler
.
RequireSameHostRedirects
=
false
handler
.
MaxBytesPerSec
=
capabilities
.
Get
()
.
PerConnectionBandwidthLimitBytesPerSec
handler
.
MaxBytesPerSec
=
capabilities
.
Get
()
.
PerConnectionBandwidthLimitBytesPerSec
return
handler
return
handler
}
}
staging/src/k8s.io/apiserver/pkg/features/kube_features.go
View file @
f501ec65
...
@@ -36,13 +36,6 @@ const (
...
@@ -36,13 +36,6 @@ const (
StreamingProxyRedirects
utilfeature
.
Feature
=
"StreamingProxyRedirects"
StreamingProxyRedirects
utilfeature
.
Feature
=
"StreamingProxyRedirects"
// owner: @tallclair
// owner: @tallclair
// alpha: v1.10
//
// ValidateProxyRedirects controls whether the apiserver should validate that redirects are only
// followed to the same host. Only used if StreamingProxyRedirects is enabled.
ValidateProxyRedirects
utilfeature
.
Feature
=
"ValidateProxyRedirects"
// owner: @tallclair
// alpha: v1.7
// alpha: v1.7
// beta: v1.8
// beta: v1.8
// GA: v1.12
// GA: v1.12
...
@@ -79,7 +72,6 @@ func init() {
...
@@ -79,7 +72,6 @@ func init() {
// available throughout Kubernetes binaries.
// available throughout Kubernetes binaries.
var
defaultKubernetesFeatureGates
=
map
[
utilfeature
.
Feature
]
utilfeature
.
FeatureSpec
{
var
defaultKubernetesFeatureGates
=
map
[
utilfeature
.
Feature
]
utilfeature
.
FeatureSpec
{
StreamingProxyRedirects
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
StreamingProxyRedirects
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ValidateProxyRedirects
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
AdvancedAuditing
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
AdvancedAuditing
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
APIListChunking
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
APIListChunking
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
DryRun
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
DryRun
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
...
...
staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy.go
View file @
f501ec65
...
@@ -161,7 +161,7 @@ func maybeWrapForConnectionUpgrades(restConfig *restclient.Config, rt http.Round
...
@@ -161,7 +161,7 @@ func maybeWrapForConnectionUpgrades(restConfig *restclient.Config, rt http.Round
return
nil
,
true
,
err
return
nil
,
true
,
err
}
}
followRedirects
:=
utilfeature
.
DefaultFeatureGate
.
Enabled
(
genericfeatures
.
StreamingProxyRedirects
)
followRedirects
:=
utilfeature
.
DefaultFeatureGate
.
Enabled
(
genericfeatures
.
StreamingProxyRedirects
)
requireSameHostRedirects
:=
utilfeature
.
DefaultFeatureGate
.
Enabled
(
genericfeatures
.
ValidateProxyRedirects
)
requireSameHostRedirects
:=
false
upgradeRoundTripper
:=
spdy
.
NewRoundTripper
(
tlsConfig
,
followRedirects
,
requireSameHostRedirects
)
upgradeRoundTripper
:=
spdy
.
NewRoundTripper
(
tlsConfig
,
followRedirects
,
requireSameHostRedirects
)
wrappedRT
,
err
:=
restclient
.
HTTPWrappersForConfig
(
restConfig
,
upgradeRoundTripper
)
wrappedRT
,
err
:=
restclient
.
HTTPWrappersForConfig
(
restConfig
,
upgradeRoundTripper
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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