Documentation
¶
Overview ¶
Package awsmultienicontroller is a Kubernetes controller that automatically creates and attaches AWS Elastic Network Interfaces (ENIs) to nodes based on node labels. Version: v1.3.0
This package can be used in two ways:
1. As a standalone Kubernetes controller (see cmd/main.go) 2. As a library for managing AWS ENIs programmatically (see pkg/lib)
For library usage, import the lib package:
import "github.com/johnlam90/aws-multi-eni-controller/pkg/lib"
Then use the ENIManager to create, attach, detach, and delete ENIs:
// Create a logger
zapLog, _ := zap.NewDevelopment()
logger := zapr.NewLogger(zapLog)
// Create an ENI manager
eniManager, err := lib.NewENIManager(ctx, "us-east-1", logger)
if err != nil {
log.Fatalf("Failed to create ENI manager: %v", err)
}
// Create an ENI
options := lib.ENIOptions{
SubnetID: "subnet-12345678",
SecurityGroupIDs: []string{"sg-12345678"},
Description: "Example ENI",
DeviceIndex: 1,
DeleteOnTermination: true,
}
eniID, err := eniManager.CreateENI(ctx, options)
For more information, see the documentation in pkg/lib/README.md.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package main implements the AWS Multi-ENI Controller, which manages the lifecycle of AWS Elastic Network Interfaces (ENIs) for Kubernetes nodes.
|
Package main implements the AWS Multi-ENI Controller, which manages the lifecycle of AWS Elastic Network Interfaces (ENIs) for Kubernetes nodes. |
|
eni-manager
command
Package main implements the AWS Multi-ENI Manager, which is responsible for bringing up secondary network interfaces on AWS EC2 instances.
|
Package main implements the AWS Multi-ENI Manager, which is responsible for bringing up secondary network interfaces on AWS EC2 instances. |
|
examples
|
|
|
library-usage
command
This example demonstrates how to use the AWS Multi-ENI Controller as a library to create and attach ENIs to EC2 instances.
|
This example demonstrates how to use the AWS Multi-ENI Controller as a library to create and attach ENIs to EC2 instances. |
|
pkg
|
|
|
apis/networking/v1alpha1
Package v1alpha1 contains API Schema definitions for the networking v1alpha1 API group.
|
Package v1alpha1 contains API Schema definitions for the networking v1alpha1 API group. |
|
aws
Package aws provides utilities for interacting with AWS services, particularly EC2 for managing Elastic Network Interfaces (ENIs).
|
Package aws provides utilities for interacting with AWS services, particularly EC2 for managing Elastic Network Interfaces (ENIs). |
|
config
Package config provides configuration management for the AWS Multi-ENI Controller and ENI Manager components.
|
Package config provides configuration management for the AWS Multi-ENI Controller and ENI Manager components. |
|
controller
Package controller implements the Kubernetes controller for managing AWS Elastic Network Interfaces (ENIs) for nodes.
|
Package controller implements the Kubernetes controller for managing AWS Elastic Network Interfaces (ENIs) for nodes. |
|
lib
Package lib provides a clean API for using AWS Multi-ENI Controller functionality as a library in other Go projects.
|
Package lib provides a clean API for using AWS Multi-ENI Controller functionality as a library in other Go projects. |
|
util
Package util provides utility functions used throughout the AWS Multi-ENI Controller.
|
Package util provides utility functions used throughout the AWS Multi-ENI Controller. |
Click to show internal directories.
Click to hide internal directories.
