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

disable disk eviction by default #293

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions pkg/cluster/internal/kubeadm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ apiServerExtraVolumes:
# so we need to ensure the cert is valid for localhost so we can talk
# to the cluster after rewriting the kubeconfig to point to localhost
apiServerCertSANs: [localhost]
kubeletConfiguration:
baseConfig:
# disable disk resource management by default
# kubelet will see the host disk that the inner container runtime
# is ultimately backed by and attempt to recover disk space.
# we don't want that.
imageGCHighThresholdPercent: 100
evictionHard:
nodefs.available: "0%"
nodefs.inodesFree: "0%"
imagefs.available: "0%"
`

// ConfigTemplateAlphaV3 is the kubadm config template for API version v1alpha3
Expand Down Expand Up @@ -128,9 +139,16 @@ apiEndpoint:
apiVersion: kubeadm.k8s.io/v1alpha3
kind: JoinConfiguration
---
# no-op entry that exists soley so it can be patched
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
# disable disk resource management by default
# kubelet will see the host disk that the inner container runtime
# is ultimately backed by and attempt to recover disk space. we don't want that.
imageGCHighThresholdPercent: 100
evictionHard:
nodefs.available: "0%"
nodefs.inodesFree: "0%"
imagefs.available: "0%"
---
# no-op entry that exists soley so it can be patched
apiVersion: kubeproxy.config.k8s.io/v1alpha1
Expand Down Expand Up @@ -166,9 +184,16 @@ localAPIEndpoint:
apiVersion: kubeadm.k8s.io/v1beta1
kind: JoinConfiguration
---
# no-op entry that exists soley so it can be patched
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
# disable disk resource management by default
# kubelet will see the host disk that the inner container runtime
# is ultimately backed by and attempt to recover disk space. we don't want that.
imageGCHighThresholdPercent: 100
evictionHard:
nodefs.available: "0%"
nodefs.inodesFree: "0%"
imagefs.available: "0%"
---
# no-op entry that exists soley so it can be patched
apiVersion: kubeproxy.config.k8s.io/v1alpha1
Expand Down