Documentation
¶
Index ¶
- func RemoveERdmaDevices(erdmaClient client.Client, ctx context.Context, nodeName string) (ctrl.Result, error)
- type ERdmaDeviceReconciler
- type EncryptedCredentialInfo
- type EriClient
- func (e *EriClient) ConvertPrimaryENI(ctx context.Context, primaryENI string, instanceID string, queuePair int) error
- func (e *EriClient) CreateEriForInstance(ctx context.Context, ...) ([]*types.ERI, error)
- func (e *EriClient) EnsureEriForInstance(ctx context.Context, devices []networkv1.DeviceInfo) ([]networkv1.DeviceStatus, error)
- func (e *EriClient) EnsureEriTags(ctx context.Context, eniIDs []string, instanceID string) error
- func (e *EriClient) InstanceFromNode(ctx context.Context, node *corev1.Node) (*ecs.DescribeInstancesResponseBodyInstancesInstance, error)
- func (e *EriClient) IsJumboFrameEnabled(ctx context.Context, instanceID string) (bool, error)
- func (e *EriClient) OwnENI(...) bool
- func (e *EriClient) SelectERIs(ctx context.Context, ...) ([]*types.ERI, error)
- func (e *EriClient) SelectEriFromExist(...) ([]*types.ERI, []int, int, error)
- type NodeReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ERdmaDeviceReconciler ¶
type ERdmaDeviceReconciler struct {
client.Client
Scheme *runtime.Scheme
EriClient *EriClient
MaxConcurrentReconciles int
}
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 EncryptedCredentialInfo ¶
type EriClient ¶
type EriClient struct {
ManagedNonOwned bool
// contains filtered or unexported fields
}
func (*EriClient) ConvertPrimaryENI ¶
func (*EriClient) CreateEriForInstance ¶
func (*EriClient) EnsureEriForInstance ¶
func (e *EriClient) EnsureEriForInstance(ctx context.Context, devices []networkv1.DeviceInfo) ([]networkv1.DeviceStatus, error)
func (*EriClient) EnsureEriTags ¶
EnsureEriTags adds the terway-excluded and instance-id tags to the given ENIs. It deliberately does NOT add the creator tag because this method is called on ENIs that may not have been created by erdma-controller (e.g. ECS-console pre-bound ERDMA NICs or Primary ENIs converted to RDMA). The creator tag is only set at CreateNetworkInterface time for ENIs this controller actually creates. TagResources is idempotent on the cloud side: re-applying the same (key,value) pair is a no-op, so this is safe to call repeatedly. instanceID may be empty, in which case the instance-id tag is skipped.
func (*EriClient) InstanceFromNode ¶ added in v0.2.12
func (*EriClient) IsJumboFrameEnabled ¶
func (*EriClient) OwnENI ¶
func (e *EriClient) OwnENI(eni *ecs.DescribeNetworkInterfacesResponseBodyNetworkInterfaceSetsNetworkInterfaceSet) bool
func (*EriClient) SelectERIs ¶
type NodeReconciler ¶
type NodeReconciler struct {
client.Client
APIReader client.Reader
Scheme *runtime.Scheme
EriClient *EriClient
CtrlConfig *types.Config
MaxConcurrentReconciles int
// contains filtered or unexported fields
}
NodeReconciler reconciles a ERdmaDevice object
func (*NodeReconciler) PredictNodeUpdate ¶
func (r *NodeReconciler) PredictNodeUpdate(oldNode, newNode *v1.Node) bool
func (*NodeReconciler) 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. 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.