peered

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HybridCluster

type HybridCluster struct {
	Name              string
	Arn               string
	Region            string
	KubernetesVersion string
	SubnetID          string
	SecurityGroupID   string
}

func GetHybridCluster

func GetHybridCluster(ctx context.Context, eksClient *eks.Client, ec2Client *ec2.Client, clusterName string) (*HybridCluster, error)

GetHybridCluster returns the hybrid cluster details.

type Infrastructure

type Infrastructure struct {
	Credentials       credentials.Infrastructure
	JumpboxInstanceId string
	NodesPublicSSHKey string
}

Infrastructure represents the necessary infrastructure for peered VPCs to be used by nodeadm.

func Setup

func Setup(ctx context.Context, logger logr.Logger, config aws.Config, clusterName string) (*Infrastructure, error)

Setup creates the necessary infrastructure for credentials providers to be used by nodeadm.

func (*Infrastructure) Teardown

func (p *Infrastructure) Teardown(ctx context.Context) error

type Node

type Node struct {
	AWS                 aws.Config
	Cluster             *HybridCluster
	EC2                 *ec2sdk.Client
	SSM                 *ssm.Client
	S3                  *s3sdk.Client
	K8s                 *clientgo.Clientset
	RemoteCommandRunner commands.RemoteCommandRunner
	Logger              logr.Logger
	SkipDelete          bool
	SetRootPassword     bool

	LogsBucket  string
	NodeadmURLs e2e.NodeadmURLs
	PublicKey   string
}

Node represents is a Hybrid node running as an EC2 instance in a peered VPC.

func (*Node) Cleanup

func (c *Node) Cleanup(ctx context.Context, instance ec2.Instance) error

Cleanup collects logs and deletes the EC2 instance and Node object.

func (Node) Create

func (c Node) Create(ctx context.Context, spec *NodeSpec) (ec2.Instance, error)

Create spins up an EC2 instance with the proper user data to join as a Hybrid node to the cluster.

type NodeSpec

type NodeSpec struct {
	InstanceName       string
	InstanceProfileARN string
	NodeK8sVersion     string
	NodeNamePrefix     string
	OS                 e2e.NodeadmOS
	Provider           e2e.NodeadmCredentialsProvider
}

NodeSpec configures the Hybrid Node.

Jump to

Keyboard shortcuts

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