Documentation
¶
Index ¶
- func JumpboxInstance(ctx context.Context, client *ec2.Client, clusterName string) (*types.Instance, error)
- func KeyPair(ctx context.Context, client *ec2.Client, clusterName string) (*types.KeyPairInfo, error)
- type HybridCluster
- type Infrastructure
- type ItBlockCloser
- type K8s
- type Network
- type Node
- type NodeCleanup
- type NodeCreate
- type NodeInfrastructureCleaner
- type NodeSpec
- type PeerdNode
- type SerialOutputBlock
- type SerialOutputConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HybridCluster ¶
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.
type ItBlockCloser ¶ added in v1.0.3
type ItBlockCloser interface {
It(description string, body func())
Close()
}
func NewSerialOutputBlockBestEffort ¶ added in v1.0.3
func NewSerialOutputBlockBestEffort(ctx context.Context, config *SerialOutputConfig) ItBlockCloser
NewSerialOutputBlockBestEffort creates a SerialOutputBlock if the serial console is available, otherwise it returns a no-op implementation.
type K8s ¶ added in v1.0.5
func (K8s) Resource ¶ added in v1.0.5
func (k K8s) Resource(resource schema.GroupVersionResource) dynamic.NamespaceableResourceInterface
type Node ¶
type Node struct {
NodeCreate
NodeCleanup
}
Node represents is a Hybrid node running as an EC2 instance in a peered VPC.
type NodeCleanup ¶ added in v1.0.3
type NodeCleanup struct {
SSM *ssm.Client
S3 *s3sdk.Client
EC2 *ec2sdk.Client
K8s clientgo.Interface
Logger logr.Logger
RemoteCommandRunner commands.RemoteCommandRunner
LogsBucket string
Cluster *HybridCluster
SkipDelete bool
InstanceId string
}
func (*NodeCleanup) Cleanup ¶ added in v1.0.3
func (c *NodeCleanup) Cleanup(ctx context.Context, node PeerdNode) error
Cleanup collects logs and deletes the EC2 instance and Node object.
func (*NodeCleanup) CleanupSSMActivation ¶ added in v1.0.4
func (c *NodeCleanup) CleanupSSMActivation(ctx context.Context, nodeName, clusterName string) error
func (*NodeCleanup) NodeInfrastructureCleaner ¶ added in v1.0.5
func (c *NodeCleanup) NodeInfrastructureCleaner(node PeerdNode) *NodeInfrastructureCleaner
type NodeCreate ¶ added in v1.0.3
type NodeCreate struct {
AWS aws.Config
Cluster *HybridCluster
EC2 *ec2sdk.Client
SSM *ssm.Client
Logger logr.Logger
SetRootPassword bool
NodeadmURLs e2e.NodeadmURLs
PublicKey string
}
func (NodeCreate) Create ¶ added in v1.0.3
Create spins up an EC2 instance with the proper user data to join as a Hybrid node to the cluster.
func (*NodeCreate) SerialConsole ¶ added in v1.0.3
func (c *NodeCreate) SerialConsole(ctx context.Context, instanceId string) (*ssh.SerialConsole, error)
SerialConsole returns the serial console for the given instance.
type NodeInfrastructureCleaner ¶ added in v1.0.5
type NodeSpec ¶
type NodeSpec struct {
EKSEndpoint string
InstanceName string
InstanceSize e2e.InstanceSize
InstanceType string
InstanceProfileARN string
NodeK8sVersion string
NodeName string
OS e2e.NodeadmOS
Provider e2e.NodeadmCredentialsProvider
}
NodeSpec configures the Hybrid Node.
type PeerdNode ¶ added in v1.0.4
PeerdNode represents a Hybrid node running as an EC2 instance in a peered VPC The Name is the name of the kubenretes node object The Instance is the underlying EC2 instance
type SerialOutputBlock ¶ added in v1.0.3
type SerialOutputBlock struct {
// contains filtered or unexported fields
}
SerialOutputBlock is a helper to run sections of a ginkgo test while outputting the serial console output of an instance. It paused the main test logs while streaming the serial console output, and resumes them once the test "body" is done. The serial console output is also saved to a file until Close is called, no matter if you are running a test block or not. This is very useful to help debugging issues with the node joining the cluster, specially if the process runs as part of the node initialization.
func NewSerialOutputBlock ¶ added in v1.0.3
func NewSerialOutputBlock(ctx context.Context, config *SerialOutputConfig) (*SerialOutputBlock, error)
func (*SerialOutputBlock) Close ¶ added in v1.0.3
func (b *SerialOutputBlock) Close()
func (*SerialOutputBlock) It ¶ added in v1.0.3
func (b *SerialOutputBlock) It(description string, body func())
It runs the test body while streaming the serial console output of the instance to stdout. It pauses the main test logs while streaming the serial console output, and resumes them once the test "body" is done. This actually doesn't create a ginkgo node, it just uses By to print the description and help distinguish this test block in the logs.