fixture

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManagementClusterCIDR = "172.64.0.0"
	WorkloadClusterCIDR   = "172.96.0.0"
)
View Source
const (
	ClusterVCPCIDR    = "172.64.0.0/16"
	ClusterSubnetCIDR = "172.64.0.0/20"
)

Variables

This section is empty.

Functions

func CreateVPC

func CreateVPC(ec2Client *ec2.EC2, cidr string) (string, error)

func DeleteKubernetesObject

func DeleteKubernetesObject(k8sClient client.Client, object client.Object) error

func DeleteRouteTable

func DeleteRouteTable(ec2Client *ec2.EC2, routeTableID string) error

func DeleteSubnet

func DeleteSubnet(ec2Client *ec2.EC2, subnetID string) error

func DeleteVPC

func DeleteVPC(ec2Client *ec2.EC2, vpcID string) error

func DisassociateRouteTable

func DisassociateRouteTable(ec2Client *ec2.EC2, associationID string) error

Types

type Cluster

type Cluster struct {
	Cluster             *capi.Cluster
	AWSCluster          *capa.AWSCluster
	ClusterRoleIdentity *capa.AWSClusterRoleIdentity
}

type Config

type Config struct {
	AWSAccount                 string
	AWSIAMRoleARN              string
	AWSRegion                  string
	ManagementClusterName      string
	ManagementClusterNamespace string
}

type Fixture

type Fixture struct {
	K8sClient client.Client
	EC2Client *ec2.EC2
	RamClient *ram.RAM

	Network           Network
	ManagementCluster Cluster
	// contains filtered or unexported fields
}

func NewFixture

func NewFixture(k8sClient client.Client, config Config) *Fixture

func (*Fixture) Setup

func (f *Fixture) Setup() error

func (*Fixture) Teardown

func (f *Fixture) Teardown() error

type Network

type Network struct {
	AssociationID string
	RouteTableID  string
	SubnetID      string
	VpcID         string
}

Jump to

Keyboard shortcuts

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