Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group. +kubebuilder:object:generate=true +groupName=intel.com
Index ¶
- Constants
- Variables
- func SetupClusterPolicyWebhookWithManager(mgr ctrl.Manager) error
- func SetupGPUFirmwareUpdateWebhookWithManager(mgr ctrl.Manager) error
- func SetupGPURecoveryPlanWebhookWithManager(mgr ctrl.Manager) error
- type ApprovalSelector
- type BuildArg
- type ClusterPolicy
- type ClusterPolicyCustomDefaulter
- type ClusterPolicyCustomValidator
- func (in *ClusterPolicyCustomValidator) DeepCopy() *ClusterPolicyCustomValidator
- func (in *ClusterPolicyCustomValidator) DeepCopyInto(out *ClusterPolicyCustomValidator)
- func (v *ClusterPolicyCustomValidator) ValidateCreate(_ context.Context, cp *ClusterPolicy) (admission.Warnings, error)
- func (v *ClusterPolicyCustomValidator) ValidateDelete(_ context.Context, _ *ClusterPolicy) (admission.Warnings, error)
- func (v *ClusterPolicyCustomValidator) ValidateUpdate(_ context.Context, _ *ClusterPolicy, cp *ClusterPolicy) (admission.Warnings, error)
- type ClusterPolicyList
- type ClusterPolicySpec
- type ClusterPolicyStatus
- type ClusterQueueSpec
- type ContainerFirmwareSource
- type DevicePluginSpec
- type DrainSpec
- type DynamicResourceAllocationSpec
- type FirmwareSource
- type FirmwareSpec
- type GPUFirmwareContent
- type GPUFirmwareFile
- type GPUFirmwareUpdate
- type GPUFirmwareUpdateCustomValidator
- func (in *GPUFirmwareUpdateCustomValidator) DeepCopy() *GPUFirmwareUpdateCustomValidator
- func (in *GPUFirmwareUpdateCustomValidator) DeepCopyInto(out *GPUFirmwareUpdateCustomValidator)
- func (v *GPUFirmwareUpdateCustomValidator) ValidateCreate(newObj context.Context, newFU *GPUFirmwareUpdate) (admission.Warnings, error)
- func (v *GPUFirmwareUpdateCustomValidator) ValidateDelete(ctx context.Context, obj *GPUFirmwareUpdate) (admission.Warnings, error)
- func (v *GPUFirmwareUpdateCustomValidator) ValidateUpdate(_ context.Context, oldFU, newFU *GPUFirmwareUpdate) (admission.Warnings, error)
- type GPUFirmwareUpdateList
- type GPUFirmwareUpdateSpec
- type GPUFirmwareUpdateStatus
- type GPUFirmwareUpdateSubsetStatus
- type GPURecoveryPlan
- type GPURecoveryPlanCustomDefaulter
- type GPURecoveryPlanCustomValidator
- func (in *GPURecoveryPlanCustomValidator) DeepCopy() *GPURecoveryPlanCustomValidator
- func (in *GPURecoveryPlanCustomValidator) DeepCopyInto(out *GPURecoveryPlanCustomValidator)
- func (v *GPURecoveryPlanCustomValidator) ValidateCreate(_ context.Context, plan *GPURecoveryPlan) (admission.Warnings, error)
- func (v *GPURecoveryPlanCustomValidator) ValidateDelete(_ context.Context, plan *GPURecoveryPlan) (admission.Warnings, error)
- func (v *GPURecoveryPlanCustomValidator) ValidateUpdate(_ context.Context, oldPlan, newPlan *GPURecoveryPlan) (admission.Warnings, error)
- type GPURecoveryPlanList
- type GPURecoveryPlanSpec
- type GPURecoveryPlanStatus
- type HealthinessSpec
- type KernelMappingSpec
- type KernelModuleBuildSpec
- type KernelModuleSpec
- type KueueQueueSpec
- type LocalQueueSpec
- type PlanState
- type RecoveryApproval
- type RecoveryEvent
- type RecoveryEventState
- type RecoveryOverride
- type RecoveryTimeoutsSpec
- type RecoveryType
- type RecoveryTypeSpec
- type RegistryTLSSpec
- type VolumeFirmwareSource
- type XpuManagerSpec
- type XpuSmiSpec
- type XpumRestartMode
Constants ¶
const ( DefaultDPImage = "docker.io/intel/intel-gpu-plugin:0.37.0@sha256:7001200071db10587fc31184eedda4f5cf291efba737adf85a8c80539f7fa5e1" DefaultDRAImage = "ghcr.io/intel/intel-gpu-resource-driver:v0.12.0@sha256:5be06e1cf810c6091cec17ed78a775be64323f2084038c8840f283f643ce4207" DefaultXPUImage = "ghcr.io/intel/xpumanager/xpumd:v2.2.0@sha256:fdefec8e5d93f76a1c7b4dda56001b7f3c2c15eae29bfbbc8971b900e6e74ae8" )
Default images used when no image is specified in the ClusterPolicy spec. These match the pinned images shipped in the Helm chart values.
const ( // Secondary Bus Reset RecoveryTypeSBR RecoveryType = "sbr" // Power cycle/cold reset through the PCIe slot, also called the PM reset. RecoveryTypeSlot RecoveryType = "slot" // Out-of-band reset through the card's AMC (Advanced Management Controller). RecoveryTypeAMC RecoveryType = "amc" // Reflash to bring a GPU with corrupted FW into an operational state. RecoveryTypeReflash RecoveryType = "reflash" // RecoveryEventStateWaitingApproval means the event is pending admin approval. This is the first state // for an event, but an error in event processing can also return it to this state. RecoveryEventStateWaitingApproval RecoveryEventState = "waiting-approval" // RecoveryEventStateMissingFirmware means reflash cannot proceed due to missing firmware. RecoveryEventStateMissingFirmware RecoveryEventState = "missing-firmware" // RecoveryEventStateBlocked means the event is approved but another recovery is already // running on the same node, so this one is held back. RecoveryEventStateBlocked RecoveryEventState = "blocked" // RecoveryEventStateDraining means the event is approved and the node hosting the GPU is // being drained before the reset runs. Reset-type recoveries only: a reflash writes // firmware without resetting the PCIe bus, so it goes straight to in-progress. RecoveryEventStateDraining RecoveryEventState = "draining" // RecoveryEventStateInProgress means a recovery Job is currently running. RecoveryEventStateInProgress RecoveryEventState = "in-progress" // RecoveryEventStateSucceeded means the recovery Job completed successfully. RecoveryEventStateSucceeded RecoveryEventState = "succeeded" // RecoveryEventStateFailed means the recovery Job failed. RecoveryEventStateFailed RecoveryEventState = "failed" PlanStateIdle PlanState = "idle" PlanStateError PlanState = "error" PlanStateActive PlanState = "active" )
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "intel.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func SetupClusterPolicyWebhookWithManager ¶
SetupClusterPolicyWebhookWithManager registers the webhook for ClusterPolicy in the manager.
func SetupGPUFirmwareUpdateWebhookWithManager ¶
SetupGPUFirmwareUpdateWebhookWithManager registers the webhook for GPUFirmwareUpdate in the manager.
func SetupGPURecoveryPlanWebhookWithManager ¶ added in v0.4.0
SetupGPURecoveryPlanWebhookWithManager registers the webhook for GPURecoveryPlan in the manager.
Types ¶
type ApprovalSelector ¶ added in v0.4.0
type ApprovalSelector struct {
// RecoveryType selects events whose suggested recovery type matches.
// +kubebuilder:validation:Enum=sbr;slot;amc;reflash
// +optional
RecoveryType RecoveryType `json:"recoveryType,omitempty"`
// NodeName selects events on a specific node.
// +optional
NodeName string `json:"nodeName,omitempty"`
// NodeSelector selects events on nodes that have all given labels.
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}
ApprovalSelector filters recovery events by type, node, or node labels.
func (*ApprovalSelector) DeepCopy ¶ added in v0.4.0
func (in *ApprovalSelector) DeepCopy() *ApprovalSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApprovalSelector.
func (*ApprovalSelector) DeepCopyInto ¶ added in v0.4.0
func (in *ApprovalSelector) DeepCopyInto(out *ApprovalSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BuildArg ¶ added in v0.4.0
BuildArg is a key-value pair passed as a build argument.
func (*BuildArg) DeepCopy ¶ added in v0.4.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildArg.
func (*BuildArg) DeepCopyInto ¶ added in v0.4.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterPolicy ¶
type ClusterPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ClusterPolicySpec `json:"spec,omitempty"`
Status ClusterPolicyStatus `json:"status,omitempty"`
}
ClusterPolicy is the Schema for the clusterpolicies API.
func (*ClusterPolicy) DeepCopy ¶
func (in *ClusterPolicy) DeepCopy() *ClusterPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPolicy.
func (*ClusterPolicy) DeepCopyInto ¶
func (in *ClusterPolicy) DeepCopyInto(out *ClusterPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterPolicy) DeepCopyObject ¶
func (in *ClusterPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterPolicyCustomDefaulter ¶
type ClusterPolicyCustomDefaulter struct{}
ClusterPolicyCustomDefaulter sets default image values on ClusterPolicy resources.
func (*ClusterPolicyCustomDefaulter) DeepCopy ¶
func (in *ClusterPolicyCustomDefaulter) DeepCopy() *ClusterPolicyCustomDefaulter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPolicyCustomDefaulter.
func (*ClusterPolicyCustomDefaulter) DeepCopyInto ¶
func (in *ClusterPolicyCustomDefaulter) DeepCopyInto(out *ClusterPolicyCustomDefaulter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterPolicyCustomDefaulter) Default ¶
func (d *ClusterPolicyCustomDefaulter) Default(_ context.Context, cp *ClusterPolicy) error
Default implements webhook.CustomDefaulter. It fills in missing image references with the pinned known-good images shipped with this version of the operator.
type ClusterPolicyCustomValidator ¶
type ClusterPolicyCustomValidator struct{}
ClusterPolicyCustomValidator validates ClusterPolicy resources on create and update.
func (*ClusterPolicyCustomValidator) DeepCopy ¶
func (in *ClusterPolicyCustomValidator) DeepCopy() *ClusterPolicyCustomValidator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPolicyCustomValidator.
func (*ClusterPolicyCustomValidator) DeepCopyInto ¶
func (in *ClusterPolicyCustomValidator) DeepCopyInto(out *ClusterPolicyCustomValidator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterPolicyCustomValidator) ValidateCreate ¶
func (v *ClusterPolicyCustomValidator) ValidateCreate(_ context.Context, cp *ClusterPolicy) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator.
func (*ClusterPolicyCustomValidator) ValidateDelete ¶
func (v *ClusterPolicyCustomValidator) ValidateDelete(_ context.Context, _ *ClusterPolicy) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator.
func (*ClusterPolicyCustomValidator) ValidateUpdate ¶
func (v *ClusterPolicyCustomValidator) ValidateUpdate(_ context.Context, _ *ClusterPolicy, cp *ClusterPolicy) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator.
type ClusterPolicyList ¶
type ClusterPolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ClusterPolicy `json:"items"`
}
ClusterPolicyList contains a list of ClusterPolicy.
func (*ClusterPolicyList) DeepCopy ¶
func (in *ClusterPolicyList) DeepCopy() *ClusterPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPolicyList.
func (*ClusterPolicyList) DeepCopyInto ¶
func (in *ClusterPolicyList) DeepCopyInto(out *ClusterPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterPolicyList) DeepCopyObject ¶
func (in *ClusterPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterPolicySpec ¶
type ClusterPolicySpec struct {
// Which type of resource registration is to be used: Device plugin (dp) or Dynamic Resource Allocation (dra).
// +kubebuilder:validation:Enum=dp;dra
ResourceRegistration string `json:"resourceRegistration"`
// To enable resource monitoring via XPU or not. Deploys GPU Plugin or DRA with monitoring enabled and
// XPU Manager DaemonSet if true.
ResourceMonitoring bool `json:"resourceMonitoring,omitempty"`
// Use NFD rule to label nodes.
UseNFDLabeling bool `json:"useNFDLabeling,omitempty"`
// Deploy Kubernetes components to integrate with Prometheus.
PrometheusIntegration bool `json:"prometheusIntegration,omitempty"`
// Set up Kueue queues for node resources
// +optional
EnableKueue bool `json:"enableKueue,omitempty"`
// Define Kueue queues
Kueue *KueueQueueSpec `json:"kueue,omitempty"`
// Enable health monitoring in DP/DRA
// These values are applied to all the Intel GPU devices in the cluster.
// Mechanism to monitor the values differ between DP and DRA. DP uses LevelZero API
// directly, while DRA relies on the health status provided by XPU Manager.
HealthinessSpec *HealthinessSpec `json:"health,omitempty"`
// +optional
DynamicResourceAllocationSpec DynamicResourceAllocationSpec `json:"dra"`
// +optional
DevicePluginSpec DevicePluginSpec `json:"dp"`
// +optional
XpuManagerSpec XpuManagerSpec `json:"xpu"`
// Pull secret is shared with all the deployments.
// +optional
PullSecret *v1.LocalObjectReference `json:"pullSecret,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
// LogLevel to overwrite the default log level of the components.
// +kubebuilder:validation:Range=0:4
// +kubebuilder:validation:Default=2
LogLevel int32 `json:"logLevel,omitempty"`
// KernelModule configures out-of-tree kernel module loading via KMM.
// When set, KMM loads the specified OOT driver module on each node.
// When nil, the in-tree kernel driver is used.
// +optional
KernelModule *KernelModuleSpec `json:"kernelModule,omitempty"`
}
ClusterPolicySpec defines the desired state of ClusterPolicy.
func (*ClusterPolicySpec) DeepCopy ¶
func (in *ClusterPolicySpec) DeepCopy() *ClusterPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPolicySpec.
func (*ClusterPolicySpec) DeepCopyInto ¶
func (in *ClusterPolicySpec) DeepCopyInto(out *ClusterPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterPolicyStatus ¶
type ClusterPolicyStatus struct {
DevicePluginStatus string `json:"devicePluginStatus,omitempty"`
DRAStatus string `json:"draStatus,omitempty"`
XPUManagerStatus string `json:"xpuManagerStatus,omitempty"`
KMMStatus string `json:"kmmStatus,omitempty"`
Errors []string `json:"errors,omitempty"`
}
ClusterPolicyStatus defines the observed state of ClusterPolicy.
func (*ClusterPolicyStatus) DeepCopy ¶
func (in *ClusterPolicyStatus) DeepCopy() *ClusterPolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPolicyStatus.
func (*ClusterPolicyStatus) DeepCopyInto ¶
func (in *ClusterPolicyStatus) DeepCopyInto(out *ClusterPolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterQueueSpec ¶
type ClusterQueueSpec struct {
// Name of the cluster queue
Name string `json:"name"`
// List of Kueue LocalQueues to create for this ClusterQueue
LocalQueues []LocalQueueSpec `json:"localQueues"`
}
ClusterQueueSpec defines a Kueue ClusterQueues
func (*ClusterQueueSpec) DeepCopy ¶
func (in *ClusterQueueSpec) DeepCopy() *ClusterQueueSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQueueSpec.
func (*ClusterQueueSpec) DeepCopyInto ¶
func (in *ClusterQueueSpec) DeepCopyInto(out *ClusterQueueSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContainerFirmwareSource ¶ added in v0.4.0
type ContainerFirmwareSource struct {
// Name is the container image reference (e.g. registry/image:tag).
Name string `json:"name"`
// InsecureSkipTLSVerify disables TLS certificate verification when the operator contacts the
// registry to verify this image and the firmware file inside it. Use it where the registry
// serves a self-signed or private-CA certificate.
// +optional
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
}
ContainerFirmwareSource references a container image holding the firmware file.
func (*ContainerFirmwareSource) DeepCopy ¶ added in v0.4.0
func (in *ContainerFirmwareSource) DeepCopy() *ContainerFirmwareSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerFirmwareSource.
func (*ContainerFirmwareSource) DeepCopyInto ¶ added in v0.4.0
func (in *ContainerFirmwareSource) DeepCopyInto(out *ContainerFirmwareSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DevicePluginSpec ¶
type DevicePluginSpec struct {
// Container image for the GPU plugin
PluginImage string `json:"plugin,omitempty"`
// Container image for the Level Zero companion container
// Deprecated: LevelzeroImage is no longer used and this configuration item will be removed in the future.
LevelzeroImage string `json:"levelzero,omitempty"`
// AllowIDs and DenyIDs are used to control which devices are registered as resources.
// Allow or deny certain PCI Device IDs. Both cannot be used together. Format is '0xabcd'.
AllowIDs []string `json:"allowIDs,omitempty"`
DenyIDs []string `json:"denyIDs,omitempty"`
// ByPathMode controls DRI by-path entries are exposed by the plugin.
// +kubebuilder:validation:Enum=single;all;none
ByPathMode string `json:"byPathMode,omitempty"`
// +kubebuilder:validation:Range=0:4
// +kubebuilder:validation:Default=1
LogLevel int32 `json:"logLevel,omitempty"`
// Set optional affinities for device plugin pods
// +optional
Affinity *v1.Affinity `json:"affinity,omitempty"`
}
DevicePluginSpec defines the desired state of DevicePlugin.
func (*DevicePluginSpec) DeepCopy ¶
func (in *DevicePluginSpec) DeepCopy() *DevicePluginSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevicePluginSpec.
func (*DevicePluginSpec) DeepCopyInto ¶
func (in *DevicePluginSpec) DeepCopyInto(out *DevicePluginSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DrainSpec ¶ added in v0.4.0
type DrainSpec struct {
// Enable controls whether the node is drained before a reset.
// +kubebuilder:default=true
// +optional
Enable *bool `json:"enable,omitempty"`
// TimeoutSeconds bounds how long a reset waits for the node to drain before the event is
// failed.
// +kubebuilder:default=300
// +kubebuilder:validation:Minimum=1
// +optional
TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
// NamespacesToSkip lists namespaces the drain leaves alone: their pods are neither evicted
// nor waited for. Use it for cluster infrastructure that is fine to keep running through a
// reset and that a whole-node drain would otherwise have to evict.
// +kubebuilder:validation:MaxItems=64
// +kubebuilder:validation:items:MaxLength=63
// +kubebuilder:validation:items:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
// +optional
NamespacesToSkip []string `json:"namespacesToSkip,omitempty"`
}
DrainSpec configures the node drain a reset-type recovery performs before it touches the hardware.
func (*DrainSpec) DeepCopy ¶ added in v0.4.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrainSpec.
func (*DrainSpec) DeepCopyInto ¶ added in v0.4.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DynamicResourceAllocationSpec ¶
type DynamicResourceAllocationSpec struct {
Image string `json:"image,omitempty"`
LogLevel int32 `json:"logLevel,omitempty"`
// Enable DRA Pod's health check.
// +kubebuilder:default=true
PodHealthCheck bool `json:"podHealthCheck,omitempty"`
// Allow DRA plugin to bind/unbind devices from xe/i915 driver to vfio/xe-vfio driver and back.
// Needed if cluster is supposed to support dynamic switching from drivers. Not needed, if hosts are
// preconfigured to either target KubeVirt or normal workloads.
ManageBinding bool `json:"manageBinding,omitempty"`
// Set optional affinities for DRA pods
// +optional
Affinity *v1.Affinity `json:"affinity,omitempty"`
}
DynamicResourceAllocationSpec defines the desired state of DynamicResourceAllocation.
func (*DynamicResourceAllocationSpec) DeepCopy ¶
func (in *DynamicResourceAllocationSpec) DeepCopy() *DynamicResourceAllocationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicResourceAllocationSpec.
func (*DynamicResourceAllocationSpec) DeepCopyInto ¶
func (in *DynamicResourceAllocationSpec) DeepCopyInto(out *DynamicResourceAllocationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FirmwareSource ¶ added in v0.4.0
type FirmwareSource struct {
// ContainerSource specifies a container image that holds the firmware file.
// +optional
ContainerSource *ContainerFirmwareSource `json:"containerSource,omitempty"`
// VolumeSource specifies a Kubernetes volume that holds the firmware file.
//
// NOT YET SUPPORTED. The field is validated but not acted upon: a reflash event on a plan
// whose source sets only volumeSource stays in the missing-firmware state, because the
// reflash Job copies firmware from a container image. Use containerSource until this is
// implemented.
// +optional
VolumeSource *VolumeFirmwareSource `json:"volumeSource,omitempty"`
}
FirmwareSource describes where the firmware file is located. At least one of ContainerSource or VolumeSource must be set.
func (*FirmwareSource) DeepCopy ¶ added in v0.4.0
func (in *FirmwareSource) DeepCopy() *FirmwareSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirmwareSource.
func (*FirmwareSource) DeepCopyInto ¶ added in v0.4.0
func (in *FirmwareSource) DeepCopyInto(out *FirmwareSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FirmwareSpec ¶ added in v0.4.0
type FirmwareSpec struct {
// Source specifies where the firmware file can be found.
Source FirmwareSource `json:"source"`
// File is the filename of the FDO firmware image to flash, relative to the root of the
// source (no path components). Must start with an alphanumeric character or '_',
// which also rules out "." and "..".
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9_][a-zA-Z0-9._-]*$`
File string `json:"file"`
}
FirmwareSpec holds everything required for a firmware reflash operation.
func (*FirmwareSpec) DeepCopy ¶ added in v0.4.0
func (in *FirmwareSpec) DeepCopy() *FirmwareSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirmwareSpec.
func (*FirmwareSpec) DeepCopyInto ¶ added in v0.4.0
func (in *FirmwareSpec) DeepCopyInto(out *FirmwareSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GPUFirmwareContent ¶
type GPUFirmwareContent struct {
// Container image containing the firmware files under /update directory.
ContainerImage string `json:"containerImage"`
Files []GPUFirmwareFile `json:"files"`
}
func (*GPUFirmwareContent) DeepCopy ¶
func (in *GPUFirmwareContent) DeepCopy() *GPUFirmwareContent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUFirmwareContent.
func (*GPUFirmwareContent) DeepCopyInto ¶
func (in *GPUFirmwareContent) DeepCopyInto(out *GPUFirmwareContent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GPUFirmwareFile ¶
type GPUFirmwareFile struct {
// +kubebuilder:validation:Enum=GFX;GFX_DATA;GFX_CODE_DATA;GFX_PSCBIN;AMC;FAN_TABLE;VR_CONFIG;OPROM_CODE;OPROM_DATA
Type string `json:"type"`
// Filename of the firmware file without any directories. Must start with an
// alphanumeric character or '_', which also rules out "." and "..".
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9_][a-zA-Z0-9._-]*$`
FileName string `json:"filename"`
// SHA256 checksum of the firmware file. Format: sha256:<64 hex characters>.
// When set, content.containerImage must be digest-pinned (image@sha256:...).
// +kubebuilder:validation:Pattern=`^sha256:[0-9a-f]{64}$`
// +optional
Checksum string `json:"checksum,omitempty"`
}
func (*GPUFirmwareFile) DeepCopy ¶
func (in *GPUFirmwareFile) DeepCopy() *GPUFirmwareFile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUFirmwareFile.
func (*GPUFirmwareFile) DeepCopyInto ¶
func (in *GPUFirmwareFile) DeepCopyInto(out *GPUFirmwareFile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GPUFirmwareUpdate ¶
type GPUFirmwareUpdate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec GPUFirmwareUpdateSpec `json:"spec,omitempty"`
Status GPUFirmwareUpdateStatus `json:"status,omitempty"`
}
GPUFirmwareUpdate is the Schema for the gpufirmwareupdates API. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=gpufirmwareupdates,scope=Cluster
func (*GPUFirmwareUpdate) DeepCopy ¶
func (in *GPUFirmwareUpdate) DeepCopy() *GPUFirmwareUpdate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUFirmwareUpdate.
func (*GPUFirmwareUpdate) DeepCopyInto ¶
func (in *GPUFirmwareUpdate) DeepCopyInto(out *GPUFirmwareUpdate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GPUFirmwareUpdate) DeepCopyObject ¶
func (in *GPUFirmwareUpdate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GPUFirmwareUpdateCustomValidator ¶
type GPUFirmwareUpdateCustomValidator struct {
}
as this struct is used only for temporary operations and does not need to be deeply copied.
func (*GPUFirmwareUpdateCustomValidator) DeepCopy ¶
func (in *GPUFirmwareUpdateCustomValidator) DeepCopy() *GPUFirmwareUpdateCustomValidator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUFirmwareUpdateCustomValidator.
func (*GPUFirmwareUpdateCustomValidator) DeepCopyInto ¶
func (in *GPUFirmwareUpdateCustomValidator) DeepCopyInto(out *GPUFirmwareUpdateCustomValidator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GPUFirmwareUpdateCustomValidator) ValidateCreate ¶
func (v *GPUFirmwareUpdateCustomValidator) ValidateCreate(newObj context.Context, newFU *GPUFirmwareUpdate) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type GPUFirmwareUpdate.
func (*GPUFirmwareUpdateCustomValidator) ValidateDelete ¶
func (v *GPUFirmwareUpdateCustomValidator) ValidateDelete(ctx context.Context, obj *GPUFirmwareUpdate) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type GPUFirmwareUpdate.
func (*GPUFirmwareUpdateCustomValidator) ValidateUpdate ¶
func (v *GPUFirmwareUpdateCustomValidator) ValidateUpdate(_ context.Context, oldFU, newFU *GPUFirmwareUpdate) (admission.Warnings, error)
ValidateUpdate rejects changes to fields that are immutable once an update is in progress.
type GPUFirmwareUpdateList ¶
type GPUFirmwareUpdateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []GPUFirmwareUpdate `json:"items"`
}
GPUFirmwareUpdateList contains a list of GPUFirmwareUpdate. +kubebuilder:object:root=true
func (*GPUFirmwareUpdateList) DeepCopy ¶
func (in *GPUFirmwareUpdateList) DeepCopy() *GPUFirmwareUpdateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUFirmwareUpdateList.
func (*GPUFirmwareUpdateList) DeepCopyInto ¶
func (in *GPUFirmwareUpdateList) DeepCopyInto(out *GPUFirmwareUpdateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GPUFirmwareUpdateList) DeepCopyObject ¶
func (in *GPUFirmwareUpdateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GPUFirmwareUpdateSpec ¶
type GPUFirmwareUpdateSpec struct {
// List of GPU firmwares to be updated.
Content GPUFirmwareContent `json:"content"`
// +kubebuilder:validation:Enum=canary;direct
UpdateMethod string `json:"updateMethod"`
// Updater container to run the firmware update.
// Should container xpu-smi tool that is used to perform the updates.
UpdaterImage string `json:"updaterImage"`
// Pull secret for the updater image and the content image, if needed.
ImagePullSecret string `json:"imagePullSecret,omitempty"`
// Target PCI Device ID in case the node has multiple GPU types. Format is '0xabcd'.
// +kubebuilder:validation:Pattern=`^0x[0-9a-f]{4}$`
PCIDeviceID string `json:"pciDeviceID,omitempty"`
// Taint key to be applied to nodes during firmware update.
// Taint value is always NoSchedule.
// +kubebuilder:default=gpufirmware-update
UpdateTaint string `json:"updateTaint"`
// Tolerations needed to be scheduled to the node.
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
// Node selector to target specific nodes for firmware update.
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// InsecureSkipTLSVerify disables TLS certificate verification when the operator
// contacts the content image registry to check reachability or verify file checksums.
// Use this when the registry uses a self-signed or private-CA certificate.
// Note: this flag only affects the operator's pre-verification calls; the actual
// firmware-update DaemonSet image pull is controlled by the node's container runtime.
// +optional
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
// HoldAfterCanary, when true, pauses the update in the canary_done state after a
// successful canary update and waits for HoldAfterCanary to be set to false.
// When false (default), the full rollout starts automatically.
// +optional
HoldAfterCanary bool `json:"holdAfterCanary,omitempty"`
}
GPUFirmwareUpdateSpec defines the desired state of GPUFirmwareUpdate.
func (*GPUFirmwareUpdateSpec) DeepCopy ¶
func (in *GPUFirmwareUpdateSpec) DeepCopy() *GPUFirmwareUpdateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUFirmwareUpdateSpec.
func (*GPUFirmwareUpdateSpec) DeepCopyInto ¶
func (in *GPUFirmwareUpdateSpec) DeepCopyInto(out *GPUFirmwareUpdateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GPUFirmwareUpdateStatus ¶
type GPUFirmwareUpdateStatus struct {
// Indicates the current state of the firmware update process.
// Moves from "" (not started) -> "draining" -> "updating" -> "cleanup" -> "completed" or "error".
State string `json:"state"`
// Messages contains informational or error messages related to the update process.
Messages []string `json:"messages"`
// Substatus for nodes.
NodeInfos GPUFirmwareUpdateSubsetStatus `json:"nodeInfos"`
}
GPUFirmwareUpdateStatus defines the observed state of GPUFirmwareUpdate.
func (*GPUFirmwareUpdateStatus) DeepCopy ¶
func (in *GPUFirmwareUpdateStatus) DeepCopy() *GPUFirmwareUpdateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUFirmwareUpdateStatus.
func (*GPUFirmwareUpdateStatus) DeepCopyInto ¶
func (in *GPUFirmwareUpdateStatus) DeepCopyInto(out *GPUFirmwareUpdateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GPUFirmwareUpdateSubsetStatus ¶
type GPUFirmwareUpdateSubsetStatus struct {
All []string `json:"allNodes,omitempty"`
Pending []string `json:"pendingNodes,omitempty"`
Draining []string `json:"drainingNodes,omitempty"`
Updating []string `json:"updatingNodes,omitempty"`
Completed []string `json:"completedNodes,omitempty"`
Error []string `json:"errorNodes,omitempty"`
Jobs []string `json:"jobs,omitempty"`
}
func (*GPUFirmwareUpdateSubsetStatus) DeepCopy ¶
func (in *GPUFirmwareUpdateSubsetStatus) DeepCopy() *GPUFirmwareUpdateSubsetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUFirmwareUpdateSubsetStatus.
func (*GPUFirmwareUpdateSubsetStatus) DeepCopyInto ¶
func (in *GPUFirmwareUpdateSubsetStatus) DeepCopyInto(out *GPUFirmwareUpdateSubsetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GPURecoveryPlan ¶ added in v0.4.0
type GPURecoveryPlan struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec GPURecoveryPlanSpec `json:"spec,omitempty"`
Status GPURecoveryPlanStatus `json:"status,omitempty"`
}
GPURecoveryPlan is the Schema for the gpurecoveryplans API.
func (*GPURecoveryPlan) DeepCopy ¶ added in v0.4.0
func (in *GPURecoveryPlan) DeepCopy() *GPURecoveryPlan
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPURecoveryPlan.
func (*GPURecoveryPlan) DeepCopyInto ¶ added in v0.4.0
func (in *GPURecoveryPlan) DeepCopyInto(out *GPURecoveryPlan)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GPURecoveryPlan) DeepCopyObject ¶ added in v0.4.0
func (in *GPURecoveryPlan) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GPURecoveryPlanCustomDefaulter ¶ added in v0.4.0
type GPURecoveryPlanCustomDefaulter struct{}
GPURecoveryPlanCustomDefaulter struct is responsible for setting default values on the custom resource of the Kind GPURecoveryPlan when those are created or updated.
func (*GPURecoveryPlanCustomDefaulter) DeepCopy ¶ added in v0.4.0
func (in *GPURecoveryPlanCustomDefaulter) DeepCopy() *GPURecoveryPlanCustomDefaulter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPURecoveryPlanCustomDefaulter.
func (*GPURecoveryPlanCustomDefaulter) DeepCopyInto ¶ added in v0.4.0
func (in *GPURecoveryPlanCustomDefaulter) DeepCopyInto(out *GPURecoveryPlanCustomDefaulter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GPURecoveryPlanCustomDefaulter) Default ¶ added in v0.4.0
func (d *GPURecoveryPlanCustomDefaulter) Default(_ context.Context, plan *GPURecoveryPlan) error
Default implements webhook.CustomDefaulter so a webhook will be registered for the Kind GPURecoveryPlan. It generates IDs for any spec.approvals entries that are missing one.
type GPURecoveryPlanCustomValidator ¶ added in v0.4.0
type GPURecoveryPlanCustomValidator struct{}
GPURecoveryPlanCustomValidator struct is responsible for validating the GPURecoveryPlan resource when it is created, updated, or deleted.
func (*GPURecoveryPlanCustomValidator) DeepCopy ¶ added in v0.4.0
func (in *GPURecoveryPlanCustomValidator) DeepCopy() *GPURecoveryPlanCustomValidator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPURecoveryPlanCustomValidator.
func (*GPURecoveryPlanCustomValidator) DeepCopyInto ¶ added in v0.4.0
func (in *GPURecoveryPlanCustomValidator) DeepCopyInto(out *GPURecoveryPlanCustomValidator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GPURecoveryPlanCustomValidator) ValidateCreate ¶ added in v0.4.0
func (v *GPURecoveryPlanCustomValidator) ValidateCreate(_ context.Context, plan *GPURecoveryPlan) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type GPURecoveryPlan.
func (*GPURecoveryPlanCustomValidator) ValidateDelete ¶ added in v0.4.0
func (v *GPURecoveryPlanCustomValidator) ValidateDelete(_ context.Context, plan *GPURecoveryPlan) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type GPURecoveryPlan.
func (*GPURecoveryPlanCustomValidator) ValidateUpdate ¶ added in v0.4.0
func (v *GPURecoveryPlanCustomValidator) ValidateUpdate(_ context.Context, oldPlan, newPlan *GPURecoveryPlan) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type GPURecoveryPlan. It also prevents firmware changes while any reflash event is in-progress.
type GPURecoveryPlanList ¶ added in v0.4.0
type GPURecoveryPlanList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []GPURecoveryPlan `json:"items"`
}
GPURecoveryPlanList contains a list of GPURecoveryPlan.
func (*GPURecoveryPlanList) DeepCopy ¶ added in v0.4.0
func (in *GPURecoveryPlanList) DeepCopy() *GPURecoveryPlanList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPURecoveryPlanList.
func (*GPURecoveryPlanList) DeepCopyInto ¶ added in v0.4.0
func (in *GPURecoveryPlanList) DeepCopyInto(out *GPURecoveryPlanList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GPURecoveryPlanList) DeepCopyObject ¶ added in v0.4.0
func (in *GPURecoveryPlanList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GPURecoveryPlanSpec ¶ added in v0.4.0
type GPURecoveryPlanSpec struct {
// DeviceID is the mandatory PCI device ID of the target GPU. Format: '0x' followed by 4 lower-case hex digits.
// +kubebuilder:validation:Pattern=`^0x[0-9a-f]{4}$`
DeviceID string `json:"deviceId"`
// SubDeviceID is the optional PCI sub-device ID. Format: '0x' followed by 4 lower-case hex digits.
// +kubebuilder:validation:Pattern=`^0x[0-9a-f]{4}$`
// +optional
SubDeviceID string `json:"subDeviceId,omitempty"`
// SubVendorID is the optional PCI sub-vendor ID. Format: '0x' followed by 4 lower-case hex digits.
// +kubebuilder:validation:Pattern=`^0x[0-9a-f]{4}$`
// +optional
SubVendorID string `json:"subVendorId,omitempty"`
// Approvals contains admin-provided authorisations for specific or grouped recovery events.
// The operator generates an ID for any entry that is missing one.
// +optional
Approvals []RecoveryApproval `json:"approvals,omitempty"`
// XpuSmi configures the container image providing the xpu-smi tool.
// +kubebuilder:default={pullPolicy: "IfNotPresent"}
// +optional
XpuSmi XpuSmiSpec `json:"xpuSmi,omitempty"`
// DefaultResetType is the reset the operator runs for every reset-type recovery event it
// creates on this plan. One of "slot" (PCIe slot power cycle, also called the PM reset),
// "amc" (out-of-band reset through the card's AMC) or "sbr" (Secondary Bus Reset).
// +kubebuilder:validation:Enum=sbr;slot;amc
// +kubebuilder:validation:Required
DefaultResetType RecoveryType `json:"defaultResetType"`
// Firmware holds configuration for reflash-type recovery operations.
// These fields are protected: changes are rejected while any reflash event is active.
// +optional
Firmware *FirmwareSpec `json:"firmware,omitempty"`
// Tolerations are added to recovery Job pods on top of the blanket toleration the operator
// always sets, for cases where a cluster needs an extra entry.
// +optional
Tolerations []core.Toleration `json:"tolerations,omitempty"`
// Drain configures the node drain that precedes a reset-type recovery.
// +kubebuilder:default={enable: true, timeoutSeconds: 300}
// +optional
Drain DrainSpec `json:"drain,omitempty"`
// Timeouts bounds how long the recovery Jobs themselves may run.
// +kubebuilder:default={resetSeconds: 300, reflashSeconds: 600}
// +optional
Timeouts RecoveryTimeoutsSpec `json:"timeouts,omitempty"`
// SkipImageVerification disables the pre-flight registry check on the images a recovery Job
// needs (spec.xpuSmi.image, and the firmware image for a reflash).
// +optional
SkipImageVerification bool `json:"skipImageVerification,omitempty"`
}
GPURecoveryPlanSpec defines the desired state of GPURecoveryPlan.
func (*GPURecoveryPlanSpec) DeepCopy ¶ added in v0.4.0
func (in *GPURecoveryPlanSpec) DeepCopy() *GPURecoveryPlanSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPURecoveryPlanSpec.
func (*GPURecoveryPlanSpec) DeepCopyInto ¶ added in v0.4.0
func (in *GPURecoveryPlanSpec) DeepCopyInto(out *GPURecoveryPlanSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GPURecoveryPlanStatus ¶ added in v0.4.0
type GPURecoveryPlanStatus struct {
// State is the overall state of this recovery plan.
// +optional
State PlanState `json:"state,omitempty"`
// Messages contains recent informational or error messages (most recent last, capped at ~50).
// +optional
Messages []string `json:"messages,omitempty"`
// Events is the list of active and recently completed recovery needs (capped at 1000).
// +optional
Events []RecoveryEvent `json:"events,omitempty"`
}
GPURecoveryPlanStatus defines the observed state of GPURecoveryPlan.
func (*GPURecoveryPlanStatus) DeepCopy ¶ added in v0.4.0
func (in *GPURecoveryPlanStatus) DeepCopy() *GPURecoveryPlanStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPURecoveryPlanStatus.
func (*GPURecoveryPlanStatus) DeepCopyInto ¶ added in v0.4.0
func (in *GPURecoveryPlanStatus) DeepCopyInto(out *GPURecoveryPlanStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HealthinessSpec ¶
type HealthinessSpec struct {
// Not supported by Device Plugin
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=3600
// +kubebuilder:default:=5
CheckIntervalSeconds int32 `json:"checkIntervalSeconds,omitempty"`
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=130
// +kubebuilder:default:=100
CoreTemperatureThreshold int32 `json:"coreTemperatureThreshold,omitempty"`
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=130
// +kubebuilder:default:=100
MemoryTemperatureThreshold int32 `json:"memoryTemperatureThreshold,omitempty"`
}
HealthinessSpec defines the thresholds for health monitoring.
func (*HealthinessSpec) DeepCopy ¶
func (in *HealthinessSpec) DeepCopy() *HealthinessSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthinessSpec.
func (*HealthinessSpec) DeepCopyInto ¶
func (in *HealthinessSpec) DeepCopyInto(out *HealthinessSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KernelMappingSpec ¶ added in v0.4.0
type KernelMappingSpec struct {
// Regexp is a regular expression matched against node kernel versions.
// Use anchored patterns (e.g. "^5\\.14\\.0-.*$") for exact matches.
Regexp string `json:"regexp"`
// ContainerImage is the full image reference for this kernel version.
// Required when Build is nil. KMM template vars (e.g. ${KERNEL_FULL_VERSION},
// $MOD_NAME) are supported and resolved by KMM at reconcile time.
//
// Changing ContainerImage is the recommended way to upgrade the driver: KMM
// rolls the new image out to all selected nodes at once, briefly disrupting
// GPU workloads as the module reloads.
// +optional
ContainerImage string `json:"containerImage,omitempty"`
// Build configures in-cluster building of the driver image via KMM.
// When set, KMM builds the image if it doesn't exist in the registry.
// +optional
Build *KernelModuleBuildSpec `json:"build,omitempty"`
// InTreeModulesToRemove lists additional in-tree modules to unload
// for this mapping. ModuleName is always included automatically.
// +optional
InTreeModulesToRemove []string `json:"inTreeModulesToRemove,omitempty"`
// RegistryTLS overrides parent-level TLS settings for this mapping.
// +optional
RegistryTLS *RegistryTLSSpec `json:"registryTLS,omitempty"`
}
KernelMappingSpec maps a kernel version pattern to a container image or build specification.
func (*KernelMappingSpec) DeepCopy ¶ added in v0.4.0
func (in *KernelMappingSpec) DeepCopy() *KernelMappingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelMappingSpec.
func (*KernelMappingSpec) DeepCopyInto ¶ added in v0.4.0
func (in *KernelMappingSpec) DeepCopyInto(out *KernelMappingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KernelModuleBuildSpec ¶ added in v0.4.0
type KernelModuleBuildSpec struct {
// DockerfileConfigMap references a ConfigMap containing the Dockerfile.
DockerfileConfigMap v1.LocalObjectReference `json:"dockerfileConfigMap"`
// BuildArgs are key-value pairs passed to the image builder.
// +optional
BuildArgs []BuildArg `json:"buildArgs,omitempty"`
// Secrets are made available during the build (e.g., for private
// source repos). Not for registry auth -- use pullSecret on
// ClusterPolicySpec.
// +optional
Secrets []v1.LocalObjectReference `json:"secrets,omitempty"`
}
KernelModuleBuildSpec configures in-cluster driver image building.
func (*KernelModuleBuildSpec) DeepCopy ¶ added in v0.4.0
func (in *KernelModuleBuildSpec) DeepCopy() *KernelModuleBuildSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelModuleBuildSpec.
func (*KernelModuleBuildSpec) DeepCopyInto ¶ added in v0.4.0
func (in *KernelModuleBuildSpec) DeepCopyInto(out *KernelModuleBuildSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KernelModuleSpec ¶ added in v0.4.0
type KernelModuleSpec struct {
// ModuleName is the kernel module to load (defaults to "xe").
// +kubebuilder:default=xe
ModuleName string `json:"moduleName,omitempty"`
// Version opts into KMM's ordered upgrade
// (https://kmm.sigs.k8s.io/documentation/ordered_upgrade) for advanced,
// low-disruption driver rollouts. When set, KMM loads the module onto a node
// only once a cluster admin labels that node
// "kmm.node.kubernetes.io/version-module.<module-namespace>.<module-name>=<version>",
// letting the admin sequence the upgrade node-by-node and drain GPU workloads
// first. Nodes without a matching label are left untouched.
//
// Most users should leave Version unset and instead upgrade by changing the
// containerImage of the relevant kernelMappings entry (see ContainerImage),
// which rolls the new driver out to all selected nodes at once without any
// per-node label choreography.
// +optional
Version string `json:"version,omitempty"`
// KernelMappings maps kernel version patterns to container images or
// build specifications. Translates directly to KMM KernelMapping objects.
// +kubebuilder:validation:MinItems=1
KernelMappings []KernelMappingSpec `json:"kernelMappings"`
// ModulesLoadingOrder specifies softdep-style loading order for
// multi-module drivers. First element must be ModuleName (defaults
// to "xe"); KMM loads in order and unloads in reverse. Must have
// >=2 entries if set.
// +optional
ModulesLoadingOrder []string `json:"modulesLoadingOrder,omitempty"`
// FirmwarePath is the in-container path where firmware files are stored.
// +optional
FirmwarePath string `json:"firmwarePath,omitempty"`
// RegistryTLS configures TLS for accessing the module image registry.
// +optional
RegistryTLS *RegistryTLSSpec `json:"registryTLS,omitempty"`
}
KernelModuleSpec configures out-of-tree kernel module loading via KMM.
func (*KernelModuleSpec) DeepCopy ¶ added in v0.4.0
func (in *KernelModuleSpec) DeepCopy() *KernelModuleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelModuleSpec.
func (*KernelModuleSpec) DeepCopyInto ¶ added in v0.4.0
func (in *KernelModuleSpec) DeepCopyInto(out *KernelModuleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KueueQueueSpec ¶
type KueueQueueSpec struct {
// Cluster queues for dividing resources evenly
EqualResources []ClusterQueueSpec `json:"equalResources"`
}
KueueQueueSpec defines Kueue cluster and local queues
func (*KueueQueueSpec) DeepCopy ¶
func (in *KueueQueueSpec) DeepCopy() *KueueQueueSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KueueQueueSpec.
func (*KueueQueueSpec) DeepCopyInto ¶
func (in *KueueQueueSpec) DeepCopyInto(out *KueueQueueSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalQueueSpec ¶
type LocalQueueSpec struct {
// Name of the cluster queue
Name string `json:"name"`
// Namespace for the local queue
Namespace string `json:"namespace"`
}
LocalQueueSpec defines a Kueue Local Queue
func (*LocalQueueSpec) DeepCopy ¶
func (in *LocalQueueSpec) DeepCopy() *LocalQueueSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalQueueSpec.
func (*LocalQueueSpec) DeepCopyInto ¶
func (in *LocalQueueSpec) DeepCopyInto(out *LocalQueueSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlanState ¶ added in v0.4.0
type PlanState string
PlanState represents the overall state of the recovery plan. +kubebuilder:validation:Enum=idle;error;active
type RecoveryApproval ¶ added in v0.4.0
type RecoveryApproval struct {
// ID is the unique identifier for this approval entry.
// The operator generates an ID when this field is empty.
// +optional
ID string `json:"id,omitempty"`
// EventID references a specific event by its status.events[].id.
// Mutually exclusive with Selector.
// +optional
EventID string `json:"eventId,omitempty"`
// Selector applies this approval to all currently matching events.
// Mutually exclusive with EventID.
// +optional
Selector *ApprovalSelector `json:"selector,omitempty"`
// Override substitutes a different recovery type than the system recommendation.
// When set on an EventID approval, the system records the original suggestion in
// status.events[].recoveryType.suggestedType for audit purposes.
// +optional
Override *RecoveryOverride `json:"override,omitempty"`
// Persistent keeps this approval alive after matched events are processed so that
// future events matching the Selector are approved automatically.
// Only meaningful when Selector is set.
// +optional
Persistent bool `json:"persistent,omitempty"`
// Consumed is set to true by the operator after a non-persistent approval has been
// matched and acted upon. Persistent approvals are never consumed.
// +optional
Consumed bool `json:"consumed,omitempty"`
// Comment is an optional human-readable note about why this approval was granted.
// +optional
Comment string `json:"comment,omitempty"`
}
RecoveryApproval authorises one or more recovery events. Exactly one of EventID or Selector must be set. An approval is active as long as it exists in the list and Consumed is false.
func (*RecoveryApproval) DeepCopy ¶ added in v0.4.0
func (in *RecoveryApproval) DeepCopy() *RecoveryApproval
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecoveryApproval.
func (*RecoveryApproval) DeepCopyInto ¶ added in v0.4.0
func (in *RecoveryApproval) DeepCopyInto(out *RecoveryApproval)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecoveryEvent ¶ added in v0.4.0
type RecoveryEvent struct {
// ID is the operator-assigned unique event identifier (e.g. "evt-a3f2").
ID string `json:"id"`
// ApprovalID is the ID of the spec.approvals entry that matched and authorised this event.
// +optional
ApprovalID string `json:"approvalId,omitempty"`
// ApprovalMatchedAt is the timestamp when an approval first matched this event.
// +optional
ApprovalMatchedAt *metav1.Time `json:"approvalMatchedAt,omitempty"`
// NodeName is the Kubernetes node hosting the affected GPU.
NodeName string `json:"nodeName"`
// GPUBDF is the PCI Bus:Device.Function address of the affected GPU (e.g. "0000:02:00.0").
GPUBDF string `json:"gpuBDF"`
// Reason is the human-readable cause of this event (e.g. "gpu-wedged", "survivability-mode").
// +optional
Reason string `json:"reason,omitempty"`
// RecoveryType describes the recovery operation to perform.
RecoveryType RecoveryTypeSpec `json:"recoveryType"`
// State is the current lifecycle state of this recovery event.
// +kubebuilder:validation:Enum=waiting-approval;missing-firmware;blocked;draining;in-progress;succeeded;failed
State RecoveryEventState `json:"state"`
// StateMessage explains, in one sentence, why this event is in the state it is in, where the
// state alone does not say: which other recovery is holding the node, which spec field carries
// an image that cannot be pulled, what a timed-out drain was still waiting on, which Job
// failed and on which attempt, why an approved event is unapproved again.
// +optional
StateMessage string `json:"stateMessage,omitempty"`
// ImageVerifyGeneration is the plan's metadata.generation at the time of the last failed
// pre-flight image verification for this event, and the reason the event is back in
// waiting-approval with its approval still in place.
// The failure itself is reported in StateMessage, which is what an admin reads; this field is
// only the bookkeeping that keeps the check from repeating. Both are cleared once verification
// succeeds.
// +optional
ImageVerifyGeneration int64 `json:"imageVerifyGeneration,omitempty"`
// DrainStartedAt is when the node drain for this event began. Reset from nil on each
// attempt so a retry gets a full drain timeout rather than inheriting the previous one.
// +optional
DrainStartedAt *metav1.Time `json:"drainStartedAt,omitempty"`
// PodsBlockingDrain names the pods still keeping the node from being drained, in
// "namespace/name" form, so an admin can see what a stalled drain is waiting on without
// reading operator logs. Capped at a handful of entries.
// +optional
PodsBlockingDrain []string `json:"podsBlockingDrain,omitempty"`
// ClaimsBlockingReset names the ResourceClaims that still reserve this GPU, in
// "namespace/name" form. A non-empty list means the reset is held back because a workload
// has not released the device yet.
// +optional
ClaimsBlockingReset []string `json:"claimsBlockingReset,omitempty"`
// JobName is the name of the Kubernetes Job created to execute the recovery, if any.
// +optional
JobName string `json:"jobName,omitempty"`
// PastJobs is the names of all Jobs created for this event across all attempts, so its length
// is the number of attempts made so far.
// +optional
PastJobs []string `json:"pastJobs,omitempty"`
// LastUpdated is the timestamp of the most recent state change for this event.
LastUpdated *metav1.Time `json:"lastUpdated"`
}
RecoveryEvent represents a single detected GPU recovery need and its lifecycle state.
func (*RecoveryEvent) DeepCopy ¶ added in v0.4.0
func (in *RecoveryEvent) DeepCopy() *RecoveryEvent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecoveryEvent.
func (*RecoveryEvent) DeepCopyInto ¶ added in v0.4.0
func (in *RecoveryEvent) DeepCopyInto(out *RecoveryEvent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecoveryEventState ¶ added in v0.4.0
type RecoveryEventState string
RecoveryEventState represents the lifecycle state of a recovery event. +kubebuilder:validation:Enum=waiting-approval;missing-firmware;blocked;draining;in-progress;succeeded;failed
type RecoveryOverride ¶ added in v0.4.0
type RecoveryOverride struct {
// RecoveryType is the recovery operation to use instead of the system suggestion.
// +kubebuilder:validation:Enum=sbr;slot;amc;reflash
RecoveryType RecoveryType `json:"recoveryType"`
}
RecoveryOverride allows the admin to escalate or change the suggested recovery type.
func (*RecoveryOverride) DeepCopy ¶ added in v0.4.0
func (in *RecoveryOverride) DeepCopy() *RecoveryOverride
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecoveryOverride.
func (*RecoveryOverride) DeepCopyInto ¶ added in v0.4.0
func (in *RecoveryOverride) DeepCopyInto(out *RecoveryOverride)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecoveryTimeoutsSpec ¶ added in v0.4.0
type RecoveryTimeoutsSpec struct {
// ResetSeconds bounds a reset-type recovery Job (SBR, slot power cycle, AMC reset).
// +kubebuilder:default=300
// +kubebuilder:validation:Minimum=1
// +optional
ResetSeconds int32 `json:"resetSeconds,omitempty"`
// ReflashSeconds bounds a reflash recovery Job.
// +kubebuilder:default=600
// +kubebuilder:validation:Minimum=1
// +optional
ReflashSeconds int32 `json:"reflashSeconds,omitempty"`
}
RecoveryTimeoutsSpec bounds the runtime of the recovery Jobs, i.e. the Job's activeDeadlineSeconds.
func (*RecoveryTimeoutsSpec) DeepCopy ¶ added in v0.4.0
func (in *RecoveryTimeoutsSpec) DeepCopy() *RecoveryTimeoutsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecoveryTimeoutsSpec.
func (*RecoveryTimeoutsSpec) DeepCopyInto ¶ added in v0.4.0
func (in *RecoveryTimeoutsSpec) DeepCopyInto(out *RecoveryTimeoutsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecoveryType ¶ added in v0.4.0
type RecoveryType string
RecoveryType represents the type of GPU recovery operation. +kubebuilder:validation:Enum=sbr;slot;amc;reflash
type RecoveryTypeSpec ¶ added in v0.4.0
type RecoveryTypeSpec struct {
// Type is the recovery operation to execute: a reset (SBR, slot power cycle, or
// AMC reset) or a firmware reflash.
// +kubebuilder:validation:Enum=sbr;slot;amc;reflash
Type RecoveryType `json:"type"`
// SuggestedType is the recovery type originally recommended by the system before
// any admin override was applied. Recorded for audit purposes.
// +kubebuilder:validation:Enum=sbr;slot;amc;reflash
// +optional
SuggestedType RecoveryType `json:"suggestedType,omitempty"`
}
RecoveryTypeSpec describes which recovery operation to perform, including any admin override.
func (*RecoveryTypeSpec) DeepCopy ¶ added in v0.4.0
func (in *RecoveryTypeSpec) DeepCopy() *RecoveryTypeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecoveryTypeSpec.
func (*RecoveryTypeSpec) DeepCopyInto ¶ added in v0.4.0
func (in *RecoveryTypeSpec) DeepCopyInto(out *RecoveryTypeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (RecoveryTypeSpec) IsReflash ¶ added in v0.4.0
func (rt RecoveryTypeSpec) IsReflash() bool
IsReflash returns true when this recovery operation is a firmware reflash rather than a hardware reset.
type RegistryTLSSpec ¶ added in v0.4.0
type RegistryTLSSpec struct {
Insecure bool `json:"insecure,omitempty"`
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
}
RegistryTLSSpec configures TLS behavior for accessing container image registries.
func (*RegistryTLSSpec) DeepCopy ¶ added in v0.4.0
func (in *RegistryTLSSpec) DeepCopy() *RegistryTLSSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryTLSSpec.
func (*RegistryTLSSpec) DeepCopyInto ¶ added in v0.4.0
func (in *RegistryTLSSpec) DeepCopyInto(out *RegistryTLSSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeFirmwareSource ¶ added in v0.4.0
type VolumeFirmwareSource struct {
// Name is the name of the PersistentVolumeClaim.
Name string `json:"name"`
}
VolumeFirmwareSource references a Kubernetes volume holding the firmware file. See FirmwareSource.VolumeSource: not yet supported.
func (*VolumeFirmwareSource) DeepCopy ¶ added in v0.4.0
func (in *VolumeFirmwareSource) DeepCopy() *VolumeFirmwareSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeFirmwareSource.
func (*VolumeFirmwareSource) DeepCopyInto ¶ added in v0.4.0
func (in *VolumeFirmwareSource) DeepCopyInto(out *VolumeFirmwareSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type XpuManagerSpec ¶
type XpuManagerSpec struct {
Image string `json:"image,omitempty"`
// +kubebuilder:validation:Range=0:3
// +kubebuilder:validation:Default=2
LogLevel int32 `json:"logLevel,omitempty"`
// ConfigMapOverride allows overriding the default OpenTelemetry Collector configuration used by XPU Manager.
// Configmap has to be in the same namespace as the operator and contain a key "config.yaml" with the configuration content.
// The value should be a YAML string containing the configuration. If not set, a default configuration will be used.
ConfigMapOverride string `json:"configMapOverride,omitempty"`
// Set monitoring resource name for Device Plugin use. If not set, the default resource
// name "gpu.intel.com/monitoring" will be used.
// +kubebuilder:validation:Enum=i915_monitoring;xe_monitoring;monitoring
MonitoringResource string `json:"monitoringResource,omitempty"`
// Set optional affinities for XPU pods
// +optional
Affinity *v1.Affinity `json:"affinity,omitempty"`
// RestartOnDeviceRecovery controls whether the operator restarts a node's XPU Manager pod so
// that it can monitor a GPU its container cannot currently reach.
// +kubebuilder:validation:Enum=OnRecoveredDevice;Always;Disabled
// +kubebuilder:default:=OnRecoveredDevice
// +optional
RestartOnDeviceRecovery XpumRestartMode `json:"restartOnDeviceRecovery,omitempty"`
}
XpuManagerSpec defines the desired state of XpuManager.
func (*XpuManagerSpec) DeepCopy ¶
func (in *XpuManagerSpec) DeepCopy() *XpuManagerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XpuManagerSpec.
func (*XpuManagerSpec) DeepCopyInto ¶
func (in *XpuManagerSpec) DeepCopyInto(out *XpuManagerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type XpuSmiSpec ¶ added in v0.4.0
type XpuSmiSpec struct {
// Image is the container image providing the xpu-smi tool, used for both hardware resets
// and firmware reflash operations.
// +optional
Image string `json:"image,omitempty"`
// PullPolicy controls the image pull policy for the xpu-smi container.
// +kubebuilder:validation:Enum=Always;IfNotPresent;Never
// +kubebuilder:default="IfNotPresent"
// +optional
PullPolicy string `json:"pullPolicy,omitempty"`
// InsecureSkipTLSVerify disables TLS certificate verification when the operator contacts the
// registry to check that Image resolves. Use it where the registry serves a self-signed or
// private-CA certificate.
// +optional
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
}
XpuSmiSpec describes the xpu-smi container image every recovery Job runs.
func (*XpuSmiSpec) DeepCopy ¶ added in v0.4.0
func (in *XpuSmiSpec) DeepCopy() *XpuSmiSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XpuSmiSpec.
func (*XpuSmiSpec) DeepCopyInto ¶ added in v0.4.0
func (in *XpuSmiSpec) DeepCopyInto(out *XpuSmiSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type XpumRestartMode ¶ added in v0.4.0
type XpumRestartMode string
XpumRestartMode selects when the operator replaces a node's XPU Manager pod to give it a GPU its container cannot reach.
const ( // XpumRestartOnRecoveredDevice restarts the pod for a usable GPU its container was never // given a device node for, and leaves a re-enumerated one to XPU Manager's own rescan. XpumRestartOnRecoveredDevice XpumRestartMode = "OnRecoveredDevice" // XpumRestartAlways also restarts when a device the container does hold re-enumerates. XpumRestartAlways XpumRestartMode = "Always" // XpumRestartDisabled disables both the record and the restart. XpumRestartDisabled XpumRestartMode = "Disabled" )