validator

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentConfiguration   = "configuration"
	ComponentFeatureGates    = "feature gates"
	ComponentCPUManager      = "CPU manager"
	ComponentMemoryManager   = "memory manager"
	ComponentTopologyManager = "topology manager"
)
View Source
const (
	// these are the recommended values
	CPUManagerReconcilePeriodMin = 1 * time.Second
	CPUManagerReconcilePeriodMax = 10 * time.Second
)
View Source
const (
	ExpectedPodResourcesFeatureGate = "KubeletPodResourcesGetAllocatable"
	ExpectedCPUManagerPolicy        = "static"
	ExpectedMemoryManagerPolicy     = kubeletconfigv1beta1.StaticMemoryManagerPolicy
	ExpectedTopologyManagerPolicy   = kubeletconfigv1beta1.SingleNumaNodeTopologyManagerPolicy
)
View Source
const (
	AreaCluster = "cluster"
	AreaKubelet = "kubelet"
)
View Source
const (
	ComponentAPIVersion = "API Version"
)
View Source
const (
	ExpectedMinKubeVersion = "1.21"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ValidationResult

type ValidationResult struct {
	Node      string `json:"node"`
	Area      string `json:"area"`
	Component string `json:"component"`
	Setting   string `json:"setting"`
	Expected  string `json:"expected"`
	Detected  string `json:"detected"`
}

func ValidateClusterNodeKubeletConfig added in v0.4.0

func ValidateClusterNodeKubeletConfig(nodeName string, nodeVersion *version.Info, kubeletConf *kubeletconfigv1beta1.KubeletConfiguration) []ValidationResult

func ValidateClusterVersion added in v0.4.0

func ValidateClusterVersion(clusterVersion string) []ValidationResult

func (ValidationResult) String

func (vr ValidationResult) String() string

type Validator

type Validator struct {
	Log logr.Logger
	// contains filtered or unexported fields
}

func NewValidator added in v0.4.0

func NewValidator(logger logr.Logger) (*Validator, error)

func NewValidatorWithDiscoveryClient added in v0.4.0

func NewValidatorWithDiscoveryClient(logger logr.Logger, cli *discovery.DiscoveryClient) (*Validator, error)

func (*Validator) Results added in v0.4.0

func (vd *Validator) Results() []ValidationResult

func (*Validator) ValidateClusterConfig

func (vd *Validator) ValidateClusterConfig(nodes []corev1.Node) ([]ValidationResult, error)

func (*Validator) ValidateClusterVersion added in v0.4.0

func (vd *Validator) ValidateClusterVersion(cli *discovery.DiscoveryClient) ([]ValidationResult, error)

func (*Validator) ValidateNodeKubeletConfig

func (vd *Validator) ValidateNodeKubeletConfig(nodeName string, nodeVersion *version.Info, kubeletConf *kubeletconfigv1beta1.KubeletConfiguration) []ValidationResult

Jump to

Keyboard shortcuts

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