nodestatus

package
v1.14.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
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

type Setter func(node *v1.Node) error

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() v1.ResourceList,
	devicePluginResourceCapacityFunc func() (v1.ResourceList, v1.ResourceList, []string),
	nodeAllocatableReservationFunc func() v1.ResourceList,
	recordEventFunc func(eventType, event, message string),
) 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(nodeIP net.IP,
	validateNodeIPFunc func(net.IP) error,
	hostname string,
	hostnameOverridden bool,
	externalCloudProvider bool,
	cloud cloudprovider.Interface,
	nodeAddressesFunc func() ([]v1.NodeAddress, error),
) Setter

NodeAddress returns a Setter that updates address-related information 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() []string,
	networkErrorsFunc func() []string,
	appArmorValidateHostFunc func() error,
	cmStatusFunc func() cm.Status,
	recordEventFunc func(eventType, event string),
) Setter

ReadyCondition returns a Setter that updates the v1.NodeReady condition on the node.

func VersionInfo

func VersionInfo(versionInfoFunc func() (*cadvisorapiv1.VersionInfo, error),
	runtimeTypeFunc func() string,
	runtimeVersionFunc func() (kubecontainer.Version, error),
) Setter

VersionInfo returns a Setter that updates version-related information on the node.

func VolumeLimits

func VolumeLimits(volumePluginListFunc func() []volume.VolumePluginWithAttachLimits,
) Setter

VolumeLimits returns a Setter that updates the volume limits 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL