plugins

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName for NodeAffinityScoring.
	NodeAffinityScoringPluginName = "NodeAffinityScoring"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BasePlugin

type BasePlugin struct {
	// Enabled indicates whether the plugin is enabled.
	// +kubebuilder:"validation:Required"
	Enabled bool `json:"enabled" protobuf:"varint,1,opt,name=enabled" kubebuilder:"validation:Required"`
}

BasePlugin defines basic structure of a plugin

func (*BasePlugin) DeepCopy

func (in *BasePlugin) DeepCopy() *BasePlugin

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasePlugin.

func (*BasePlugin) DeepCopyInto

func (in *BasePlugin) DeepCopyInto(out *BasePlugin)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BasePlugin) IsEnabled

func (b *BasePlugin) IsEnabled() bool

IsEnabled returns the value of the Enabled field.

func (*BasePlugin) Name

func (b *BasePlugin) Name() string

Name returns the name of the BasePlugin.

type IBasePlugin

type IBasePlugin interface {
	// Enabled is a required boolean field.
	IsEnabled() bool
	// PluginName returns the name of the plugin.
	Name() string
}

IBasePlugin defines a basic interface for plugins. +k8s:deepcopy-gen=false

type NodeAffinityScoring

type NodeAffinityScoring struct {
	BasePlugin `json:",inline"`

	// Platforms is a required field and must contain at least one entry.
	// +kubebuilder:validation:MinItems=1
	Platforms []NodeAffinityScoringPlatformTerm `json:"platforms" protobuf:"bytes,2,opt,name=platforms"`
}

NodeAffinityScoring is the plugin that implements the ScorePlugin interface.

func (*NodeAffinityScoring) DeepCopy

func (in *NodeAffinityScoring) DeepCopy() *NodeAffinityScoring

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAffinityScoring.

func (*NodeAffinityScoring) DeepCopyInto

func (in *NodeAffinityScoring) DeepCopyInto(out *NodeAffinityScoring)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeAffinityScoring) Name

func (b *NodeAffinityScoring) Name() string

Name returns the name of the NodeAffinityScoringPluginName.

type NodeAffinityScoringPlatformTerm

type NodeAffinityScoringPlatformTerm struct {
	// Architecture must be a list of non-empty string of arch names.
	// +kubebuilder:validation:Enum=arm64;amd64;ppc64le;s390x
	Architecture string `json:"architecture" protobuf:"bytes,1,rep,name=architecture"`

	// weight associated with matching the corresponding NodeAffinityScoringPlatformTerm,
	// in the range 1-100.
	// +kubebuilder:validation:Minimum:=1
	// +kubebuilder:validation:Maximum:=100
	Weight int32 `json:"weight" protobuf:"bytes,3,rep,name=weight"`
}

NodeAffinityScoringPlatformTerm holds configuration for specific platforms, with required fields validated.

func (*NodeAffinityScoringPlatformTerm) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAffinityScoringPlatformTerm.

func (*NodeAffinityScoringPlatformTerm) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Plugins

type Plugins struct {
	// +kubebuilder:"validation:Required
	NodeAffinityScoring *NodeAffinityScoring `json:"nodeAffinityScoring,omitempty"`
}

Plugins represents the plugins configuration.

func (*Plugins) DeepCopy

func (in *Plugins) DeepCopy() *Plugins

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugins.

func (*Plugins) DeepCopyInto

func (in *Plugins) DeepCopyInto(out *Plugins)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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