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
c115b5ae
Commit
c115b5ae
authored
Feb 05, 2019
by
ksubrmnn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add WinDSR and WinOverlay feature flags
parent
b724bdb1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
BUILD
pkg/proxy/winkernel/BUILD
+2
-0
proxier.go
pkg/proxy/winkernel/proxier.go
+8
-0
kube_features.go
staging/src/k8s.io/apiserver/pkg/features/kube_features.go
+14
-0
No files found.
pkg/proxy/winkernel/BUILD
View file @
c115b5ae
...
@@ -24,6 +24,8 @@ go_library(
...
@@ -24,6 +24,8 @@ go_library(
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/features:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
"//staging/src/k8s.io/client-go/tools/record:go_default_library",
"//staging/src/k8s.io/client-go/tools/record:go_default_library",
"//vendor/github.com/Microsoft/hcsshim:go_default_library",
"//vendor/github.com/Microsoft/hcsshim:go_default_library",
"//vendor/github.com/Microsoft/hcsshim/hcn:go_default_library",
"//vendor/github.com/Microsoft/hcsshim/hcn:go_default_library",
...
...
pkg/proxy/winkernel/proxier.go
View file @
c115b5ae
...
@@ -38,6 +38,8 @@ import (
...
@@ -38,6 +38,8 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apimachinery/pkg/util/wait"
genericfeatures
"k8s.io/apiserver/pkg/features"
utilfeature
"k8s.io/apiserver/pkg/util/feature"
"k8s.io/client-go/tools/record"
"k8s.io/client-go/tools/record"
apiservice
"k8s.io/kubernetes/pkg/api/v1/service"
apiservice
"k8s.io/kubernetes/pkg/api/v1/service"
"k8s.io/kubernetes/pkg/apis/core/v1/helper"
"k8s.io/kubernetes/pkg/apis/core/v1/helper"
...
@@ -531,6 +533,9 @@ func NewProxier(
...
@@ -531,6 +533,9 @@ func NewProxier(
}
}
klog
.
V
(
1
)
.
Infof
(
"Hns Network loaded with info = %v"
,
hnsNetworkInfo
)
klog
.
V
(
1
)
.
Infof
(
"Hns Network loaded with info = %v"
,
hnsNetworkInfo
)
isDSR
:=
config
.
EnableDSR
isDSR
:=
config
.
EnableDSR
if
isDSR
&&
!
utilfeature
.
DefaultFeatureGate
.
Enabled
(
genericfeatures
.
WinDSR
)
{
return
nil
,
fmt
.
Errorf
(
"WinDSR feature gate not enabled"
)
}
err
=
hcn
.
DSRSupported
()
err
=
hcn
.
DSRSupported
()
if
isDSR
&&
err
!=
nil
{
if
isDSR
&&
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -539,6 +544,9 @@ func NewProxier(
...
@@ -539,6 +544,9 @@ func NewProxier(
var
sourceVip
string
var
sourceVip
string
var
hostMac
string
var
hostMac
string
if
hnsNetworkInfo
.
networkType
==
"Overlay"
{
if
hnsNetworkInfo
.
networkType
==
"Overlay"
{
if
!
utilfeature
.
DefaultFeatureGate
.
Enabled
(
genericfeatures
.
WinOverlay
)
{
return
nil
,
fmt
.
Errorf
(
"WinOverlay feature gate not enabled"
)
}
err
=
hcn
.
RemoteSubnetSupported
()
err
=
hcn
.
RemoteSubnetSupported
()
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
staging/src/k8s.io/apiserver/pkg/features/kube_features.go
View file @
c115b5ae
...
@@ -88,6 +88,18 @@ const (
...
@@ -88,6 +88,18 @@ const (
//
//
// Server-side apply. Merging happens on the server.
// Server-side apply. Merging happens on the server.
ServerSideApply
utilfeature
.
Feature
=
"ServerSideApply"
ServerSideApply
utilfeature
.
Feature
=
"ServerSideApply"
// owner: @ksubrmnn
// alpha: v1.14
//
// Allows kube-proxy to run in Overlay mode for Windows
WinOverlay
utilfeature
.
Feature
=
"WinOverlay"
// owner: @ksubrmnn
// alpha: v1.14
//
// Allows kube-proxy to create DSR loadbalancers for Windows
WinDSR
utilfeature
.
Feature
=
"WinDSR"
)
)
func
init
()
{
func
init
()
{
...
@@ -106,4 +118,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
...
@@ -106,4 +118,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
APIListChunking
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
APIListChunking
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
DryRun
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
DryRun
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ServerSideApply
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
ServerSideApply
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
WinOverlay
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
WinDSR
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
}
}
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