const MaxNamesPerImageInNodeStatus … type Setter … // NodeAddress returns a Setter that updates address-related information on the node. func NodeAddress(nodeIPs []net.IP, // typically Kubelet.nodeIPs validateNodeIPFunc func(net.IP) error, // typically Kubelet.nodeIPValidator hostname string, // typically Kubelet.hostname hostnameOverridden bool, // was the hostname force set? externalCloudProvider bool, // typically Kubelet.externalCloudProvider cloud cloudprovider.Interface, // typically Kubelet.cloud nodeAddressesFunc func() ([]v1.NodeAddress, error), // typically Kubelet.cloudResourceSyncManager.NodeAddresses resolveAddressFunc func(net.IP) (net.IP, error), // typically k8s.io/apimachinery/pkg/util/net.ResolveBindAddress ) Setter { … } func hasAddressType(addresses []v1.NodeAddress, addressType v1.NodeAddressType) bool { … } func hasAddressValue(addresses []v1.NodeAddress, addressValue string) bool { … } // MachineInfo returns a Setter that updates machine-related information on the node. func MachineInfo(nodeName string, maxPods int, podsPerCore int, machineInfoFunc func() (*cadvisorapiv1.MachineInfo, error), // typically Kubelet.GetCachedMachineInfo capacityFunc func(localStorageCapacityIsolation bool) v1.ResourceList, // typically Kubelet.containerManager.GetCapacity devicePluginResourceCapacityFunc func() (v1.ResourceList, v1.ResourceList, []string), // typically Kubelet.containerManager.GetDevicePluginResourceCapacity nodeAllocatableReservationFunc func() v1.ResourceList, // typically Kubelet.containerManager.GetNodeAllocatableReservation recordEventFunc func(eventType, event, message string), // typically Kubelet.recordEvent localStorageCapacityIsolation bool, ) Setter { … } // VersionInfo returns a Setter that updates version-related information on the node. func VersionInfo(versionInfoFunc func() (*cadvisorapiv1.VersionInfo, error), // typically Kubelet.cadvisor.VersionInfo runtimeTypeFunc func() string, // typically Kubelet.containerRuntime.Type runtimeVersionFunc func(ctx context.Context) (kubecontainer.Version, error), // typically Kubelet.containerRuntime.Version ) Setter { … } // DaemonEndpoints returns a Setter that updates the daemon endpoints on the node. func DaemonEndpoints(daemonEndpoints *v1.NodeDaemonEndpoints) Setter { … } // Images returns a Setter that updates the images on the node. // imageListFunc is expected to return a list of images sorted in descending order by image size. // nodeStatusMaxImages is ignored if set to -1. func Images(nodeStatusMaxImages int32, imageListFunc func() ([]kubecontainer.Image, error), // typically Kubelet.imageManager.GetImageList ) Setter { … } // GoRuntime returns a Setter that sets GOOS and GOARCH on the node. func GoRuntime() Setter { … } // NodeFeatures returns a Setter that sets NodeFeatures on the node. func NodeFeatures(featuresGetter func() *kubecontainer.RuntimeFeatures) Setter { … } // RuntimeHandlers returns a Setter that sets RuntimeHandlers on the node. func RuntimeHandlers(fn func() []kubecontainer.RuntimeHandler) Setter { … } // ReadyCondition returns a Setter that updates the v1.NodeReady condition on the node. func ReadyCondition( nowFunc func() time.Time, // typically Kubelet.clock.Now runtimeErrorsFunc func() error, // typically Kubelet.runtimeState.runtimeErrors networkErrorsFunc func() error, // typically Kubelet.runtimeState.networkErrors storageErrorsFunc func() error, // typically Kubelet.runtimeState.storageErrors cmStatusFunc func() cm.Status, // typically Kubelet.containerManager.Status nodeShutdownManagerErrorsFunc func() error, // typically kubelet.shutdownManager.errors. recordEventFunc func(eventType, event string), // typically Kubelet.recordNodeStatusEvent localStorageCapacityIsolation bool, ) Setter { … } // MemoryPressureCondition returns a Setter that updates the v1.NodeMemoryPressure condition on the node. func MemoryPressureCondition(nowFunc func() time.Time, // typically Kubelet.clock.Now pressureFunc func() bool, // typically Kubelet.evictionManager.IsUnderMemoryPressure recordEventFunc func(eventType, event string), // typically Kubelet.recordNodeStatusEvent ) Setter { … } // PIDPressureCondition returns a Setter that updates the v1.NodePIDPressure condition on the node. func PIDPressureCondition(nowFunc func() time.Time, // typically Kubelet.clock.Now pressureFunc func() bool, // typically Kubelet.evictionManager.IsUnderPIDPressure recordEventFunc func(eventType, event string), // typically Kubelet.recordNodeStatusEvent ) Setter { … } // DiskPressureCondition returns a Setter that updates the v1.NodeDiskPressure condition on the node. func DiskPressureCondition(nowFunc func() time.Time, // typically Kubelet.clock.Now pressureFunc func() bool, // typically Kubelet.evictionManager.IsUnderDiskPressure recordEventFunc func(eventType, event string), // typically Kubelet.recordNodeStatusEvent ) Setter { … } // VolumesInUse returns a Setter that updates the volumes in use on the node. func VolumesInUse(syncedFunc func() bool, // typically Kubelet.volumeManager.ReconcilerStatesHasBeenSynced volumesInUseFunc func() []v1.UniqueVolumeName, // typically Kubelet.volumeManager.GetVolumesInUse ) Setter { … }