controller

package
v0.0.0-...-3baa139 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveERdmaDevices

func RemoveERdmaDevices(erdmaClient client.Client, ctx context.Context, nodeName string) (ctrl.Result, error)

Types

type ERdmaDeviceReconciler

type ERdmaDeviceReconciler struct {
	client.Client
	Scheme    *runtime.Scheme
	EriClient *EriClient
}

ERdmaDeviceReconciler reconciles a ERdmaDevice object

func (*ERdmaDeviceReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ERdmaDevice object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.0/pkg/reconcile

func (*ERdmaDeviceReconciler) SetupWithManager

func (r *ERdmaDeviceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type EriClient

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

func NewEriClient

func NewEriClient() (*EriClient, error)

func (*EriClient) ConvertPrimaryENI

func (e *EriClient) ConvertPrimaryENI(primaryENI string, queuePair int) error

func (*EriClient) CreateEriForInstance

func (e *EriClient) CreateEriForInstance(instanceInfo *ecs.DescribeInstancesResponseBodyInstancesInstance, cardIndex []int, queuePair int) ([]*types.ERI, error)

func (*EriClient) EnsureEriForInstance

func (e *EriClient) EnsureEriForInstance(devices []networkv1.DeviceInfo) ([]networkv1.DeviceStatus, error)

func (*EriClient) InstanceIDFromNode

func (e *EriClient) InstanceIDFromNode(node *corev1.Node) (string, error)

func (*EriClient) SelectERIs

func (e *EriClient) SelectERIs(instanceID string) ([]*types.ERI, error)

type NodeReconciler

type NodeReconciler struct {
	client.Client
	Scheme    *runtime.Scheme
	EriClient *EriClient
}

NodeReconciler reconciles a ERdmaDevice object

func (*NodeReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ERdmaDevice object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.0/pkg/reconcile

func (*NodeReconciler) SetupWithManager

func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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