validator

package
v0.4.16-0rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidatorKubeletConfig = "k8scfg"
)
View Source
const (
	ValidatorNodeResourceTopologies = "nrt"
)
View Source
const (
	ValidatorPodStatus = "podst"
)
View Source
const (
	ValidatorSchedCache = "schedcache"
)

Variables

This section is empty.

Functions

func Available

func Available() sets.Set[string]

func CollectKubeletConfig

func CollectKubeletConfig(ctx context.Context, cli client.Client, data *ValidatorData) error

func CollectNodeResourceTopologies

func CollectNodeResourceTopologies(ctx context.Context, _ client.Client, data *ValidatorData) error

func CollectPodStatus

func CollectPodStatus(ctx context.Context, cli client.Client, data *ValidatorData) error

func CollectSchedCache

func CollectSchedCache(ctx context.Context, cli client.Client, data *ValidatorData) error

func Collectors

func Collectors() map[string]CollectFunc

func GetKubeletConfigurationsFromTASEnabledNodes

func GetKubeletConfigurationsFromTASEnabledNodes(ctx context.Context, cli client.Client) (map[string]*kubeletconfigv1beta1.KubeletConfiguration, error)

func GetNodesByLabels

func GetNodesByLabels(ctx context.Context, cli client.Client, userLabels string) (sets.Set[string], error)

func GetNodesByNRO

func GetNodesByNRO(ctx context.Context, cli client.Client) (sets.Set[string], error)

func IsNodeResourceTopologyCRDMissing

func IsNodeResourceTopologyCRDMissing(err error) bool

func Requested

func Requested(what string) (sets.Set[string], error)

func ValidateKubeletConfig

func ValidateKubeletConfig(data ValidatorData) ([]deployervalidator.ValidationResult, error)

func ValidateNodeResourceTopologies

func ValidateNodeResourceTopologies(data ValidatorData) ([]deployervalidator.ValidationResult, error)

func Validators

func Validators() map[string]ValidateFunc

Types

type CollectFunc

type CollectFunc func(ctx context.Context, cli client.Client, data *ValidatorData) error

type Report

type Report struct {
	Succeeded bool                                 `json:"succeeded"`
	Errors    []deployervalidator.ValidationResult `json:"errors,omitempty"`
}

func Validate

func Validate(data ValidatorData) (Report, error)

type ValidateFunc

type ValidateFunc func(data ValidatorData) ([]validator.ValidationResult, error)

type ValidatorData

type ValidatorData struct {
	// contains filtered or unexported fields
}

func Collect

func Collect(ctx context.Context, cli client.Client, userLabels string, what sets.Set[string]) (ValidatorData, error)

Jump to

Keyboard shortcuts

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