multus

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DedicatedStorageNodeType = "storage-nodes"
	DedicatedWorkerNodeType  = "worker-nodes"
)
View Source
const (
	ClientTypeOSD    = "osd"
	ClientTypeNonOSD = "other"
)
View Source
const (
	DedicatedArbiterNodeType = "arbiter-node"
)
View Source
const DefaultValidationNodeType = "shared-storage-and-worker-nodes"

Variables

View Source
var (
	DefaultValidationNamespace = "rook-ceph"

	DefaultValidationOSDsPerNode = 3

	DefaultValidationOtherDaemonsPerNode = 16

	DefaultValidationNginxImage = "quay.io/nginx/nginx-unprivileged:stable-alpine"

	DefaultValidationResourceTimeout = 3 * time.Minute

	DefaultValidationFlakyThreshold = 30 * time.Second

	DefaultStorageNodeLabelKey   = "storage-node"
	DefaultStorageNodeLabelValue = "true"

	DefaultArbiterNodeLabelKey   = "topology.kubernetes.io/zone"
	DefaultArbiterNodeLabelValue = "arbiter"
	DefaultArbiterTolerationKey  = "node-role.kubernetes.io/control-plane"
)
View Source
var (
	//go:embed config.yaml
	ConfigYaml string
)

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Infof(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Warningf(format string, args ...interface{})
}

Logger defines the log types that this library will use for outputting status information to the user. Because this library may be called interactively by a user or programmatically by another application, we allow the calling application to make a very simple Logger type that will be compatible with this library.

type NodeConfig added in v1.12.5

type NodeConfig struct {
	// OSD daemons per node
	OSDsPerNode int `yaml:"osdsPerNode"`
	// Non-OSD daemons per node.
	OtherDaemonsPerNode int             `yaml:"otherDaemonsPerNode"`
	Placement           PlacementConfig `yaml:"placement"`
}

type PlacementConfig added in v1.12.5

type PlacementConfig struct {
	NodeSelector map[string]string `yaml:"nodeSelector"`
	Tolerations  []TolerationType  `yaml:"tolerations"`
}

NodeSelector and Tolerations are intentionally the only configurable parameters here. Affinity/Anti-Affinity is too relaxed of a specification to ensure the validation test runs the exact number of daemons per node that it should be running. Only allow the minimum selection configs that can be used to define nodes this test can run on.

type SimpleStderrLogger

type SimpleStderrLogger struct{}

func (*SimpleStderrLogger) Debugf

func (*SimpleStderrLogger) Debugf(format string, args ...interface{})

func (*SimpleStderrLogger) Infof

func (*SimpleStderrLogger) Infof(format string, args ...interface{})

func (*SimpleStderrLogger) Warningf

func (*SimpleStderrLogger) Warningf(format string, args ...interface{})

type TolerationType added in v1.12.5

type TolerationType corev1.Toleration

func (*TolerationType) ToJSON added in v1.12.5

func (t *TolerationType) ToJSON() (string, error)

ToJSON renders a toleration as a single-line JSON string. The JSON rendering is just as easy to read as the YAML rendering and is easier to format in the config.yaml template using Golang text templating compared to YAML. Need to define our own because corev1.Toleration.Marshal() does not render as expected.

type ValidationTest

type ValidationTest struct {
	Clientset kubernetes.Interface

	// The Logger will be used to render ongoing status by this library.
	Logger Logger

	ValidationTestConfig
}

A Multus ValidationTest runs a number of Multus-connected pods to validate that a Kubernetes environment is suitable for Rook to run Ceph in.

func (*ValidationTest) CleanUp

CleanUp cleans up Multus validation test resources. It returns a suggestion for manual action if clean up was unsuccessful.

func (*ValidationTest) Run

Run the Multus validation test.

type ValidationTestConfig added in v1.11.9

type ValidationTestConfig struct {
	Namespace       string                `yaml:"namespace"`
	PublicNetwork   string                `yaml:"publicNetwork"`
	ClusterNetwork  string                `yaml:"clusterNetwork"`
	ResourceTimeout time.Duration         `yaml:"resourceTimeout"`
	FlakyThreshold  time.Duration         `yaml:"flakyThreshold"`
	NginxImage      string                `yaml:"nginxImage"`
	NodeTypes       map[string]NodeConfig `yaml:"nodeTypes"`
}

ValidationTestConfig is a configuration for a Multus validation test. To prevent documentation for this struct from getting out of date, see the output of ValidationTestConfig.ToYAML() for usage text for each field.

func NewArbiterValidationTestConfig added in v1.12.5

func NewArbiterValidationTestConfig() *ValidationTestConfig

func NewDedicatedStorageNodesValidationTestConfig added in v1.12.5

func NewDedicatedStorageNodesValidationTestConfig() *ValidationTestConfig

func NewDefaultValidationTestConfig added in v1.11.9

func NewDefaultValidationTestConfig() *ValidationTestConfig

NewDefaultValidationTestConfig returns a new ValidationTestConfig with default values. The default test is a converged-node test with no placement.

func NewSharedStorageAndWorkerNodesValidationTestConfig added in v1.12.5

func NewSharedStorageAndWorkerNodesValidationTestConfig() *ValidationTestConfig

func ValidationTestConfigFromYAML added in v1.11.9

func ValidationTestConfigFromYAML(y string) (*ValidationTestConfig, error)

ValidationTestConfigFromYAML loads a YAML-formatted string into a new ValidationTestConfig.

func (*ValidationTestConfig) BestNodePlacementForServer added in v1.12.5

func (c *ValidationTestConfig) BestNodePlacementForServer() (PlacementConfig, error)

func (*ValidationTestConfig) String added in v1.11.9

func (c *ValidationTestConfig) String() string

String implements the Stringer interface

func (*ValidationTestConfig) ToYAML added in v1.11.9

func (c *ValidationTestConfig) ToYAML() (string, error)

ToYAML converts the validation test config into a YAML representation with user-readable comments describing how to use the various parameters.

func (*ValidationTestConfig) TotalDaemonsPerNode added in v1.12.5

func (c *ValidationTestConfig) TotalDaemonsPerNode() int

func (*ValidationTestConfig) TotalOSDsPerNode added in v1.12.5

func (c *ValidationTestConfig) TotalOSDsPerNode() int

func (*ValidationTestConfig) TotalOtherDaemonsPerNode added in v1.12.5

func (c *ValidationTestConfig) TotalOtherDaemonsPerNode() int

func (*ValidationTestConfig) Validate added in v1.11.9

func (c *ValidationTestConfig) Validate() error

Validate reports any validation test configuration problems as errors.

type ValidationTestResults

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

ValidationTestResults contains results from a validation test.

func (*ValidationTestResults) SuggestedDebuggingReport

func (vtr *ValidationTestResults) SuggestedDebuggingReport() string

Jump to

Keyboard shortcuts

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