We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9b0211 commit 16871a1Copy full SHA for 16871a1
pkg/kubelet/nodestatus/setters.go
@@ -44,6 +44,7 @@ import (
44
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
45
"k8s.io/kubernetes/pkg/kubelet/events"
46
netutils "k8s.io/utils/net"
47
+ "k8s.io/utils/ptr"
48
49
"k8s.io/klog/v2"
50
)
@@ -354,6 +355,12 @@ func MachineInfo(nodeName string,
354
355
// node status.
356
node.Status.Capacity[v1.ResourceName(removedResource)] = *resource.NewQuantity(int64(0), resource.DecimalSI)
357
}
358
+
359
+ if utilfeature.DefaultFeatureGate.Enabled(features.NodeSwap) && info.SwapCapacity != 0 {
360
+ node.Status.NodeInfo.Swap = &v1.NodeSwapStatus{
361
+ Capacity: ptr.To(int64(info.SwapCapacity)),
362
+ }
363
364
365
366
// Set Allocatable.
0 commit comments