config

package
v0.0.0-...-d0642ff Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultKataArtifactsDir = "/opt/nvidia-gpu-operator/artifacts/runtimeclasses"
	DefaultCrioRuntime      = "crun"
	// CRIO runtime
	CRIO Runtime = "crio"
	// Containerd runtime
	Containerd Runtime = "containerd"
)

Variables

This section is empty.

Functions

func SanitizeConfig

func SanitizeConfig(c *Config)

SanitizeConfig sanitizes the config struct and removes any invalid runtime class entries

Types

type Artifacts

type Artifacts struct {
	// URL is the path to the OCI artifact (payload) containing all artifacts
	// associated with a kata runtime class.
	URL string `json:"url"                  yaml:"url"`

	// PullSecret is the secret used to pull the OCI artifact.
	// +optional
	PullSecret string `json:"pullSecret,omitempty" yaml:"pullSecret,omitempty"`
}

Artifacts defines the path to an OCI artifact (payload) containing all artifacts associated with a kata RuntimeClass (e.g. kernel, guest image, initrd, kata configuration) +kubebuilder:object:generate=true

func (*Artifacts) DeepCopy

func (in *Artifacts) DeepCopy() *Artifacts

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

func (*Artifacts) DeepCopyInto

func (in *Artifacts) DeepCopyInto(out *Artifacts)

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

type Config

type Config struct {
	// ArtifactsDir is the directory where kata artifacts (e.g. kernel / guest images, configuration, etc.)
	// are placed on the local filesystem.
	// +kubebuilder:default=/opt/nvidia-gpu-operator/artifacts/runtimeclasses
	ArtifactsDir string `json:"artifactsDir,omitempty"    yaml:"artifactsDir,omitempty"`

	// RuntimeClasses is a list of kata runtime classes to configure.
	// +optional
	RuntimeClasses []RuntimeClass `json:"runtimeClasses,omitempty"  yaml:"runtimeClasses,omitempty"`
}

Config defines the configuration for the kata-manager +kubebuilder:object:root=true +kubebuilder:object:generate=true

func NewDefaultConfig

func NewDefaultConfig() *Config

NewDefaultConfig returns a new default config.

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

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

func (*Config) DeepCopyObject

func (in *Config) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Config) GetObjectKind

func (c *Config) GetObjectKind() schema.ObjectKind

GetObjectKind

type Runtime

type Runtime string

Runtime defines container runtime type

func (Runtime) String

func (r Runtime) String() string

type RuntimeClass

type RuntimeClass struct {
	// Name is the name of the kata runtime class.
	Name string `json:"name"                   yaml:"name"`

	// NodeSelector specifies the nodeSelector for the RuntimeClass object.
	// This ensures pods running with the RuntimeClass only get scheduled
	// onto nodes which support it.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"`

	// Artifacts are the kata artifacts associated with the runtime class.
	Artifacts Artifacts `json:"artifacts"              yaml:"artifacts"`
}

RuntimeClass defines the configuration for a kata RuntimeClass +kubebuilder:object:generate=true

func (*RuntimeClass) DeepCopy

func (in *RuntimeClass) DeepCopy() *RuntimeClass

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

func (*RuntimeClass) DeepCopyInto

func (in *RuntimeClass) DeepCopyInto(out *RuntimeClass)

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