Documentation ¶
Index ¶
- Constants
- type Setter
- func DaemonEndpoints(daemonEndpoints *v1.NodeDaemonEndpoints) Setter
- func DiskPressureCondition(nowFunc func() time.Time, pressureFunc func() bool, ...) Setter
- func GoRuntime() Setter
- func Images(nodeStatusMaxImages int32, imageListFunc func() ([]kubecontainer.Image, error)) Setter
- func MachineInfo(nodeName string, maxPods int, podsPerCore int, ...) Setter
- func MemoryPressureCondition(nowFunc func() time.Time, pressureFunc func() bool, ...) Setter
- func NodeAddress(nodeIPs []net.IP, validateNodeIPFunc func(net.IP) error, hostname string, ...) Setter
- func NodeFeatures(featuresGetter func() *kubecontainer.RuntimeFeatures) Setter
- func PIDPressureCondition(nowFunc func() time.Time, pressureFunc func() bool, ...) Setter
- func ReadyCondition(nowFunc func() time.Time, runtimeErrorsFunc func() error, ...) Setter
- func RuntimeHandlers(fn func() []kubecontainer.RuntimeHandler) Setter
- func VersionInfo(versionInfoFunc func() (*cadvisorapiv1.VersionInfo, error), ...) Setter
- func VolumesInUse(syncedFunc func() bool, volumesInUseFunc func() []v1.UniqueVolumeName) Setter
Constants ¶
const ( // MaxNamesPerImageInNodeStatus is max number of names // per image stored in the node status. MaxNamesPerImageInNodeStatus = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Setter ¶
Setter modifies the node in-place, and returns an error if the modification failed. Setters may partially mutate the node before returning an error.
func DaemonEndpoints ¶
func DaemonEndpoints(daemonEndpoints *v1.NodeDaemonEndpoints) Setter
DaemonEndpoints returns a Setter that updates the daemon endpoints on the node.
func DiskPressureCondition ¶
func DiskPressureCondition(nowFunc func() time.Time, pressureFunc func() bool, recordEventFunc func(eventType, event string), ) Setter
DiskPressureCondition returns a Setter that updates the v1.NodeDiskPressure condition on the node.
func GoRuntime ¶
func GoRuntime() Setter
GoRuntime returns a Setter that sets GOOS and GOARCH on the node.
func Images ¶
func Images(nodeStatusMaxImages int32, imageListFunc func() ([]kubecontainer.Image, error), ) 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 MachineInfo ¶
func MachineInfo(nodeName string, maxPods int, podsPerCore int, machineInfoFunc func() (*cadvisorapiv1.MachineInfo, error), capacityFunc func(localStorageCapacityIsolation bool) v1.ResourceList, devicePluginResourceCapacityFunc func() (v1.ResourceList, v1.ResourceList, []string), nodeAllocatableReservationFunc func() v1.ResourceList, recordEventFunc func(eventType, event, message string), localStorageCapacityIsolation bool, ) Setter
MachineInfo returns a Setter that updates machine-related information on the node.
func MemoryPressureCondition ¶
func MemoryPressureCondition(nowFunc func() time.Time, pressureFunc func() bool, recordEventFunc func(eventType, event string), ) Setter
MemoryPressureCondition returns a Setter that updates the v1.NodeMemoryPressure condition on the node.
func NodeAddress ¶
func NodeAddress(nodeIPs []net.IP, validateNodeIPFunc func(net.IP) error, hostname string, hostnameOverridden bool, externalCloudProvider bool, cloud cloudprovider.Interface, nodeAddressesFunc func() ([]v1.NodeAddress, error), resolveAddressFunc func(net.IP) (net.IP, error), ) Setter
NodeAddress returns a Setter that updates address-related information on the node.
func NodeFeatures ¶ added in v1.31.0
func NodeFeatures(featuresGetter func() *kubecontainer.RuntimeFeatures) Setter
NodeFeatures returns a Setter that sets NodeFeatures on the node.
func PIDPressureCondition ¶
func PIDPressureCondition(nowFunc func() time.Time, pressureFunc func() bool, recordEventFunc func(eventType, event string), ) Setter
PIDPressureCondition returns a Setter that updates the v1.NodePIDPressure condition on the node.
func ReadyCondition ¶
func ReadyCondition( nowFunc func() time.Time, runtimeErrorsFunc func() error, networkErrorsFunc func() error, storageErrorsFunc func() error, cmStatusFunc func() cm.Status, nodeShutdownManagerErrorsFunc func() error, recordEventFunc func(eventType, event string), localStorageCapacityIsolation bool, ) Setter
ReadyCondition returns a Setter that updates the v1.NodeReady condition on the node.
func RuntimeHandlers ¶ added in v1.30.0
func RuntimeHandlers(fn func() []kubecontainer.RuntimeHandler) Setter
RuntimeHandlers returns a Setter that sets RuntimeHandlers on the node.
func VersionInfo ¶
func VersionInfo(versionInfoFunc func() (*cadvisorapiv1.VersionInfo, error), runtimeTypeFunc func() string, runtimeVersionFunc func(ctx context.Context) (kubecontainer.Version, error), ) Setter
VersionInfo returns a Setter that updates version-related information on the node.
func VolumesInUse ¶
func VolumesInUse(syncedFunc func() bool, volumesInUseFunc func() []v1.UniqueVolumeName, ) Setter
VolumesInUse returns a Setter that updates the volumes in use on the node.