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
765cdc17
Commit
765cdc17
authored
Apr 14, 2019
by
Erik Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix kubelet --enforce-node-allocatable validation
If --cgroups-per-qos is false and --enforce-node-allocatable is "none" then validation should pass. Needed if cgroup pids is disabled.
parent
eed6fd4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
validation.go
pkg/kubelet/apis/config/validation/validation.go
+3
-1
No files found.
pkg/kubelet/apis/config/validation/validation.go
View file @
765cdc17
...
...
@@ -18,6 +18,7 @@ package validation
import
(
"fmt"
utilerrors
"k8s.io/apimachinery/pkg/util/errors"
utilvalidation
"k8s.io/apimachinery/pkg/util/validation"
utilfeature
"k8s.io/apiserver/pkg/util/feature"
...
...
@@ -38,7 +39,8 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error
if
kc
.
NodeLeaseDurationSeconds
<=
0
{
allErrors
=
append
(
allErrors
,
fmt
.
Errorf
(
"invalid configuration: NodeLeaseDurationSeconds must be greater than 0"
))
}
if
!
kc
.
CgroupsPerQOS
&&
len
(
kc
.
EnforceNodeAllocatable
)
>
0
{
if
!
kc
.
CgroupsPerQOS
&&
len
(
kc
.
EnforceNodeAllocatable
)
>
0
&&
!
(
len
(
kc
.
EnforceNodeAllocatable
)
==
1
&&
kc
.
EnforceNodeAllocatable
[
0
]
==
kubetypes
.
NodeAllocatableNoneKey
)
{
allErrors
=
append
(
allErrors
,
fmt
.
Errorf
(
"invalid configuration: EnforceNodeAllocatable (--enforce-node-allocatable) is not supported unless CgroupsPerQOS (--cgroups-per-qos) feature is turned on"
))
}
if
kc
.
SystemCgroups
!=
""
&&
kc
.
CgroupRoot
==
""
{
...
...
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