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
e1fdaa17
Commit
e1fdaa17
authored
Sep 03, 2018
by
Pengfei Ni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kubelet: only apply default hard evictions of nodefs.inodesFree on Linux
parent
058b26f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
12 deletions
+57
-12
fuzzer.go
pkg/kubelet/apis/config/fuzzer/fuzzer.go
+1
-6
BUILD
pkg/kubelet/apis/config/v1beta1/BUILD
+2
-0
defaults.go
pkg/kubelet/apis/config/v1beta1/defaults.go
+1
-6
defaults_linux.go
pkg/kubelet/apis/config/v1beta1/defaults_linux.go
+27
-0
defaults_others.go
pkg/kubelet/apis/config/v1beta1/defaults_others.go
+26
-0
No files found.
pkg/kubelet/apis/config/fuzzer/fuzzer.go
View file @
e1fdaa17
...
...
@@ -81,12 +81,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
obj
.
KubeAPIQPS
=
5
obj
.
KubeAPIBurst
=
10
obj
.
HairpinMode
=
v1beta1
.
PromiscuousBridge
obj
.
EvictionHard
=
map
[
string
]
string
{
"memory.available"
:
"100Mi"
,
"nodefs.available"
:
"10%"
,
"nodefs.inodesFree"
:
"5%"
,
"imagefs.available"
:
"15%"
,
}
obj
.
EvictionHard
=
kubeletconfigv1beta1
.
DefaultEvictionHard
obj
.
EvictionPressureTransitionPeriod
=
metav1
.
Duration
{
Duration
:
5
*
time
.
Minute
}
obj
.
MakeIPTablesUtilChains
=
true
obj
.
IPTablesMasqueradeBit
=
kubeletconfigv1beta1
.
DefaultIPTablesMasqueradeBit
...
...
pkg/kubelet/apis/config/v1beta1/BUILD
View file @
e1fdaa17
...
...
@@ -9,6 +9,8 @@ go_library(
name = "go_default_library",
srcs = [
"defaults.go",
"defaults_linux.go",
"defaults_others.go",
"doc.go",
"register.go",
"zz_generated.conversion.go",
...
...
pkg/kubelet/apis/config/v1beta1/defaults.go
View file @
e1fdaa17
...
...
@@ -178,12 +178,7 @@ func SetDefaults_KubeletConfiguration(obj *kubeletconfigv1beta1.KubeletConfigura
obj
.
SerializeImagePulls
=
utilpointer
.
BoolPtr
(
true
)
}
if
obj
.
EvictionHard
==
nil
{
obj
.
EvictionHard
=
map
[
string
]
string
{
"memory.available"
:
"100Mi"
,
"nodefs.available"
:
"10%"
,
"nodefs.inodesFree"
:
"5%"
,
"imagefs.available"
:
"15%"
,
}
obj
.
EvictionHard
=
DefaultEvictionHard
}
if
obj
.
EvictionPressureTransitionPeriod
==
zeroDuration
{
obj
.
EvictionPressureTransitionPeriod
=
metav1
.
Duration
{
Duration
:
5
*
time
.
Minute
}
...
...
pkg/kubelet/apis/config/v1beta1/defaults_linux.go
0 → 100644
View file @
e1fdaa17
// +build linux
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
v1beta1
// DefaultEvictionHard includes default options for hard eviction.
var
DefaultEvictionHard
=
map
[
string
]
string
{
"memory.available"
:
"100Mi"
,
"nodefs.available"
:
"10%"
,
"nodefs.inodesFree"
:
"5%"
,
"imagefs.available"
:
"15%"
,
}
pkg/kubelet/apis/config/v1beta1/defaults_others.go
0 → 100644
View file @
e1fdaa17
// +build !linux
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
v1beta1
// DefaultEvictionHard includes default options for hard eviction.
var
DefaultEvictionHard
=
map
[
string
]
string
{
"memory.available"
:
"100Mi"
,
"nodefs.available"
:
"10%"
,
"imagefs.available"
:
"15%"
,
}
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