controller

package
v0.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FirmwareTypeGFX         = "GFX"
	FirmwareTypeGFXDATA     = "GFX_DATA"
	FirmwareTypeGFXCODEDATA = "GFX_CODE_DATA"
	FirmwareTypeGFXPSCBIN   = "GFX_PSCBIN"
	FirmwareTypeAMC         = "AMC"
	FirmwareTypeFANTABLE    = "FAN_TABLE"
	FirmwareTypeVRCONFIG    = "VR_CONFIG"
	FirmwareTypeOPROMCODE   = "OPROM_CODE"
	FirmwareTypeOPROMDATA   = "OPROM_DATA"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterPolicyReconciler

type ClusterPolicyReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Opts   ControllerOpts
}

ClusterPolicyReconciler reconciles a ClusterPolicy object

func (*ClusterPolicyReconciler) Reconcile

func (r *ClusterPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Main Reconcile function for ClusterPolicy. Individual sub-controllers will be called from here to handle their respective resources, and any errors they return will be aggregated into the ClusterPolicy status.

func (*ClusterPolicyReconciler) SetupWithManager

func (r *ClusterPolicyReconciler) SetupWithManager(mgr ctrl.Manager, opts ControllerOpts) error

SetupWithManager sets up the controller with the Manager.

type ContentImageVerifier

type ContentImageVerifier interface {
	Verify(ctx context.Context, spec *v1alpha.GPUFirmwareUpdateSpec) error
}

ContentImageVerifier checks whether the firmware content image is reachable and, when checksums are declared, verifies each file's SHA256 against the image contents.

type ControllerOpts

type ControllerOpts struct {
	ReqName      string
	Namespace    string
	SecretName   string
	RequeueDelay time.Duration
	DRAEnable    bool
	OpenShift    bool
}

type DRAReconciler

type DRAReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Opts   ControllerOpts
}

func (*DRAReconciler) Reconcile

func (r *DRAReconciler) Reconcile(ctx context.Context, cp *v1alpha.ClusterPolicy) (ctrl.Result, error)

type DefaultContentImageVerifier

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

DefaultContentImageVerifier implements ContentImageVerifier using the OCI registry API.

func (*DefaultContentImageVerifier) Verify

Verify checks image reachability. All files are checked for existence. If a file declares a Checksum, the checksum is verified against the /fwupdate/<filename> content.

type DefaultLogsRetriever

type DefaultLogsRetriever struct {
	Clientset *kubernetes.Clientset
}

func (*DefaultLogsRetriever) RetrieveLogsForPodContainer

func (d *DefaultLogsRetriever) RetrieveLogsForPodContainer(ctx context.Context, pod *core.Pod, containerName string) ([]string, error)

type DevicePluginReconciler

type DevicePluginReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Opts   ControllerOpts
}

func (*DevicePluginReconciler) Reconcile

type GPUFirmwareUpdateReconciler

type GPUFirmwareUpdateReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	Opts ControllerOpts
	// contains filtered or unexported fields
}

GPUFirmwareUpdateReconciler reconciles a GPUFirmwareUpdate object

func (*GPUFirmwareUpdateReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*GPUFirmwareUpdateReconciler) SetupWithManager

func (r *GPUFirmwareUpdateReconciler) SetupWithManager(mgr ctrl.Manager, copts ControllerOpts) error

SetupWithManager sets up the controller with the Manager.

type LogsRetriever

type LogsRetriever interface {
	RetrieveLogsForPodContainer(ctx context.Context, pod *core.Pod, containerName string) ([]string, error)
}

type MiscReconciler

type MiscReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Opts   ControllerOpts
}

func (*MiscReconciler) Reconcile

func (r *MiscReconciler) Reconcile(ctx context.Context, cp *v1alpha.ClusterPolicy) (ctrl.Result, error)

type SubControllerInterface

type SubControllerInterface interface {
	Reconcile(ctx context.Context, cp *v1alpha.ClusterPolicy) (ctrl.Result, error)
}

type XpuManagerReconciler

type XpuManagerReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Opts   ControllerOpts
}

func (*XpuManagerReconciler) Reconcile

Jump to

Keyboard shortcuts

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