validator

package
v0.4.13-0rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func Available

func Available() sets.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 Collectors

func Collectors() map[string]CollectFunc

func GetNodesByLabels

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

func GetNodesByNRO

func GetNodesByNRO(ctx context.Context, cli client.Client) (sets.String, error)

func IsNodeResourceTopologyCRDMissing

func IsNodeResourceTopologyCRDMissing(err error) bool

func Requested

func Requested(what string) (sets.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.String) (ValidatorData, error)

Jump to

Keyboard shortcuts

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