kubernetesk8s.io/kubernetes/pkg/kubelet/util/swap Index | Files

package swap

import "k8s.io/kubernetes/pkg/kubelet/util/swap"

Index

Constants

const TmpfsNoswapOption = "noswap"

Functions

func IsSwapOn

func IsSwapOn() (bool, error)

IsSwapOn detects whether swap in enabled on the system by inspecting /proc/swaps. If the file does not exist, an os.NotFound error will be returned. If running on windows, swap is assumed to always be false.

func IsTmpfsNoswapOptionSupported

func IsTmpfsNoswapOptionSupported(mounter mount.Interface, mountPath string) bool

Source Files

swap_util.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
11 packages
Last checked
3 hours ago

Tools for package owners.