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
54662ca7
Commit
54662ca7
authored
Nov 28, 2017
by
George Kudrayvtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates Kube-proxy validators to allow Windows 'kernelspace' mode.
parent
51033c4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
types.go
pkg/proxy/apis/kubeproxyconfig/types.go
+4
-3
validation.go
pkg/proxy/apis/kubeproxyconfig/validation/validation.go
+2
-1
No files found.
pkg/proxy/apis/kubeproxyconfig/types.go
View file @
54662ca7
...
@@ -160,9 +160,10 @@ type KubeProxyConfiguration struct {
...
@@ -160,9 +160,10 @@ type KubeProxyConfiguration struct {
type
ProxyMode
string
type
ProxyMode
string
const
(
const
(
ProxyModeUserspace
ProxyMode
=
"userspace"
ProxyModeUserspace
ProxyMode
=
"userspace"
ProxyModeIPTables
ProxyMode
=
"iptables"
ProxyModeIPTables
ProxyMode
=
"iptables"
ProxyModeIPVS
ProxyMode
=
"ipvs"
ProxyModeIPVS
ProxyMode
=
"ipvs"
ProxyModeKernelspace
ProxyMode
=
"kernelspace"
)
)
// IPVSSchedulerMethod is the algorithm for allocating TCP connections and
// IPVSSchedulerMethod is the algorithm for allocating TCP connections and
...
...
pkg/proxy/apis/kubeproxyconfig/validation/validation.go
View file @
54662ca7
...
@@ -146,9 +146,10 @@ func validateProxyMode(mode kubeproxyconfig.ProxyMode, fldPath *field.Path) fiel
...
@@ -146,9 +146,10 @@ func validateProxyMode(mode kubeproxyconfig.ProxyMode, fldPath *field.Path) fiel
case
kubeproxyconfig
.
ProxyModeUserspace
:
case
kubeproxyconfig
.
ProxyModeUserspace
:
case
kubeproxyconfig
.
ProxyModeIPTables
:
case
kubeproxyconfig
.
ProxyModeIPTables
:
case
kubeproxyconfig
.
ProxyModeIPVS
:
case
kubeproxyconfig
.
ProxyModeIPVS
:
case
kubeproxyconfig
.
ProxyModeKernelspace
:
case
""
:
case
""
:
default
:
default
:
modes
:=
[]
string
{
string
(
kubeproxyconfig
.
ProxyModeUserspace
),
string
(
kubeproxyconfig
.
ProxyModeIPTables
),
string
(
kubeproxyconfig
.
ProxyModeIPVS
)}
modes
:=
[]
string
{
string
(
kubeproxyconfig
.
ProxyModeUserspace
),
string
(
kubeproxyconfig
.
ProxyModeIPTables
),
string
(
kubeproxyconfig
.
ProxyModeIPVS
)
,
string
(
kubeproxyconfig
.
ProxyModeKernelspace
)
}
errMsg
:=
fmt
.
Sprintf
(
"must be %s or blank (blank means the best-available proxy (currently iptables)"
,
strings
.
Join
(
modes
,
","
))
errMsg
:=
fmt
.
Sprintf
(
"must be %s or blank (blank means the best-available proxy (currently iptables)"
,
strings
.
Join
(
modes
,
","
))
allErrs
=
append
(
allErrs
,
field
.
Invalid
(
fldPath
.
Child
(
"ProxyMode"
),
string
(
mode
),
errMsg
))
allErrs
=
append
(
allErrs
,
field
.
Invalid
(
fldPath
.
Child
(
"ProxyMode"
),
string
(
mode
),
errMsg
))
}
}
...
...
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