Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Kubelet Disk Defaults for the 1.7 release #46448

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions cluster/vagrant/config-default.sh
Expand Up @@ -121,5 +121,3 @@ E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false}
# Default fallback NETWORK_IF_NAME, will be used in case when no 'VAGRANT-BEGIN' comments were defined in network-script
export DEFAULT_NETWORK_IF_NAME="eth0"

# Evict pods whenever compute resource availability on the nodes gets below a threshold.
EVICTION_HARD="${EVICTION_HARD:-memory.available<100Mi,nodefs.available<10%}"
2 changes: 0 additions & 2 deletions cluster/vagrant/config-test.sh
Expand Up @@ -27,5 +27,3 @@ REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-false}
# Optional: if set to true, kube-up will configure the cluster to run e2e tests.
E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false}

# Evict pods whenever compute resource availability on the nodes gets below a threshold.
EVICTION_HARD="${EVICTION_HARD:-memory.available<100Mi,nodefs.available<10%}"
2 changes: 1 addition & 1 deletion hack/local-up-cluster.sh
Expand Up @@ -45,7 +45,7 @@ CGROUP_DRIVER=${CGROUP_DRIVER:-""}
USER=${USER:-$(whoami)}

# enables testing eviction scenarios locally.
EVICTION_HARD=${EVICTION_HARD:-"memory.available<100Mi"}
EVICTION_HARD=${EVICTION_HARD:-"memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%"}
EVICTION_SOFT=${EVICTION_SOFT:-""}
EVICTION_PRESSURE_TRANSITION_PERIOD=${EVICTION_PRESSURE_TRANSITION_PERIOD:-"1m"}

Expand Down
5 changes: 1 addition & 4 deletions pkg/apis/componentconfig/v1alpha1/defaults.go
Expand Up @@ -301,9 +301,6 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) {
temp := int32(80)
obj.ImageGCLowThresholdPercent = &temp
}
if obj.LowDiskSpaceThresholdMB == 0 {
obj.LowDiskSpaceThresholdMB = 256
}
if obj.MasterServiceNamespace == "" {
obj.MasterServiceNamespace = metav1.NamespaceDefault
}
Expand Down Expand Up @@ -396,7 +393,7 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) {
obj.HairpinMode = PromiscuousBridge
}
if obj.EvictionHard == nil {
temp := "memory.available<100Mi"
temp := "memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, quick question here... why make this a percentage and not a literal value same as the old lowDiskSpace default of 256MB?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use a literal value here as well if you want. If we use 256MB, I have a couple questions:
Should we enable inode eviction? If so, is a percentage still appropriate?
Should I still remove the custom defaults for vagrant, since they used nodefs.available<10% previously?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think for a default, 10% is still probably fine. re-applying my original tag.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For storage I think performance is relative to available percentage of capacity and not an absolute value. so a percentage here makes sense

obj.EvictionHard = &temp
}
if obj.EvictionPressureTransitionPeriod == zeroDuration {
Expand Down