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 Node
- type NodeCleanup
- type NodeCreate
- type NodeSpec
- 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 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 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 NodeSpec ¶
type NodeSpec struct { InstanceName string InstanceProfileARN string NodeK8sVersion string NodeNamePrefix string OS e2e.NodeadmOS Provider e2e.NodeadmCredentialsProvider }
NodeSpec configures the Hybrid Node.
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.