cloud

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCPRegion         = "europe-west1"
	AWSRegion         = "eu-west-2"
	AzureRegion       = "northeurope"
	ResourceGroupName = "svet-test"
	Subnet1Name       = "atlas-operator-e2e-test-subnet1"
	Subnet2Name       = "atlas-operator-e2e-test-subnet2"
	Subnet1CIDR       = "10.0.0.0/25"
	Subnet2CIDR       = "10.0.0.128/25"
)
View Source
const (
	AzureKeyVaultName = "ako-kms-test"
)
View Source
const (
	// TODO get from GCP
	GoogleProjectID = "atlasoperator" // Google Cloud Project ID

)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfig added in v1.8.0

type AWSConfig struct {
	Region        string
	VPC           string
	CIDR          string
	Subnets       map[string]string
	EnableCleanup bool
}

type AWSPrivateEndpointRequest added in v1.8.0

type AWSPrivateEndpointRequest struct {
	ID          string
	Region      string
	ServiceName string
}

type AwsAction added in v1.3.0

type AwsAction struct {
	// contains filtered or unexported fields
}

func NewAWSAction added in v1.8.0

func NewAWSAction(t core.GinkgoTInterface) (*AwsAction, error)

func (*AwsAction) AcceptVpcPeeringConnection added in v1.8.0

func (a *AwsAction) AcceptVpcPeeringConnection(connectionID, region string) error

func (*AwsAction) CreateKMS added in v1.3.0

func (a *AwsAction) CreateKMS(alias, region, atlasAccountArn, assumedRoleArn string) (string, error)

func (*AwsAction) CreatePrivateEndpoint added in v1.8.0

func (a *AwsAction) CreatePrivateEndpoint(serviceName, privateEndpointName, region string) (string, error)

func (*AwsAction) GetAccountID added in v1.8.0

func (a *AwsAction) GetAccountID() (string, error)

func (*AwsAction) GetPrivateEndpoint added in v1.8.0

func (a *AwsAction) GetPrivateEndpoint(endpointID, region string) (*ec2.VpcEndpoint, error)

func (*AwsAction) InitNetwork added in v1.8.0

func (a *AwsAction) InitNetwork(vpcName, cidr, region string, subnets map[string]string, cleanup bool) (string, error)

type AzureAction added in v1.8.0

type AzureAction struct {
	// contains filtered or unexported fields
}

func NewAzureAction added in v1.8.0

func NewAzureAction(t core.GinkgoTInterface, subscriptionID, resourceGroupName string) (*AzureAction, error)

func (*AzureAction) CreateKeyVault added in v1.8.1

func (a *AzureAction) CreateKeyVault(keyName string) (string, error)

func (*AzureAction) CreatePrivateEndpoint added in v1.8.0

func (a *AzureAction) CreatePrivateEndpoint(vpcName, subnetName, endpointName, serviceID, region string) (*armnetwork.PrivateEndpoint, error)

func (*AzureAction) GetInterface added in v1.8.0

func (a *AzureAction) GetInterface(name string) (*armnetwork.Interface, error)

func (*AzureAction) GetPrivateEndpoint added in v1.8.0

func (a *AzureAction) GetPrivateEndpoint(endpointName string) (*armnetwork.PrivateEndpoint, error)

func (*AzureAction) InitNetwork added in v1.8.0

func (a *AzureAction) InitNetwork(vpcName, cidr, region string, subnets map[string]string, cleanup bool) (string, error)

type AzureConfig added in v1.8.0

type AzureConfig struct {
	Region        string
	VPC           string
	CIDR          string
	Subnets       map[string]string
	EnableCleanup bool
}

type AzurePrivateEndpointRequest added in v1.8.0

type AzurePrivateEndpointRequest struct {
	ID                string
	Region            string
	ServiceResourceID string
	SubnetName        string
}

type GCPAction added in v1.8.0

type GCPAction struct {
	// contains filtered or unexported fields
}

func NewGCPAction added in v1.8.0

func NewGCPAction(t core.GinkgoTInterface, projectID string) (*GCPAction, error)

func (*GCPAction) CreateKMS added in v1.8.1

func (a *GCPAction) CreateKMS() (string, error)

func (*GCPAction) CreateNetworkPeering added in v1.8.0

func (a *GCPAction) CreateNetworkPeering(vpcName, peerProjectID, peerVPCName string) error

func (*GCPAction) CreatePrivateEndpoint added in v1.8.0

func (a *GCPAction) CreatePrivateEndpoint(name, region, subnet, target string, index int) (string, string, error)

func (*GCPAction) GetForwardingRule added in v1.8.0

func (a *GCPAction) GetForwardingRule(name, region string, suffixIndex int) (*computepb.ForwardingRule, error)

func (*GCPAction) InitNetwork added in v1.8.0

func (a *GCPAction) InitNetwork(vpcName, region string, subnets map[string]string, cleanup bool) (string, error)

type GCPConfig added in v1.8.0

type GCPConfig struct {
	Region        string
	VPC           string
	Subnets       map[string]string
	EnableCleanup bool
}

type GCPPrivateEndpoint added in v1.8.0

type GCPPrivateEndpoint struct {
	Name string
	IP   string
}

type GCPPrivateEndpointRequest added in v1.8.0

type GCPPrivateEndpointRequest struct {
	ID         string
	Region     string
	Targets    []string
	SubnetName string
}

type PrivateEndpointDetails added in v1.8.0

type PrivateEndpointDetails struct {
	ProviderName      provider.ProviderName
	Region            string
	ID                string
	IP                string
	GCPProjectID      string
	EndpointGroupName string
	Endpoints         []GCPPrivateEndpoint
}

type PrivateEndpointRequest added in v1.8.0

type PrivateEndpointRequest interface {
	// contains filtered or unexported methods
}

type Provider added in v1.8.0

type Provider interface {
	GetAWSAccountID() string
	SetupNetwork(providerName provider.ProviderName, configs ProviderConfig) string
	SetupPrivateEndpoint(request PrivateEndpointRequest) *PrivateEndpointDetails
	ValidatePrivateEndpointStatus(providerName provider.ProviderName, endpoint, region string, gcpNumAttachments int)
	SetupNetworkPeering(providerName provider.ProviderName, peerID, peerVPC string)
}

type ProviderAction added in v1.8.0

type ProviderAction struct {
	// contains filtered or unexported fields
}

func NewProviderAction added in v1.8.0

func NewProviderAction(t core.GinkgoTInterface, aws *AwsAction, gcp *GCPAction, azure *AzureAction) *ProviderAction

func (*ProviderAction) GetAWSAccountID added in v1.8.0

func (a *ProviderAction) GetAWSAccountID() string

func (*ProviderAction) SetupNetwork added in v1.8.0

func (a *ProviderAction) SetupNetwork(providerName provider.ProviderName, config ProviderConfig) string

func (*ProviderAction) SetupNetworkPeering added in v1.8.0

func (a *ProviderAction) SetupNetworkPeering(providerName provider.ProviderName, peerID, peerVPC string)

func (*ProviderAction) SetupPrivateEndpoint added in v1.8.0

func (a *ProviderAction) SetupPrivateEndpoint(request PrivateEndpointRequest) *PrivateEndpointDetails

func (*ProviderAction) ValidatePrivateEndpointStatus added in v1.8.0

func (a *ProviderAction) ValidatePrivateEndpointStatus(providerName provider.ProviderName, endpoint, region string, gcpNumAttachments int)

type ProviderConfig added in v1.8.0

type ProviderConfig func(action *ProviderAction)

func WithAWSConfig added in v1.8.0

func WithAWSConfig(config *AWSConfig) ProviderConfig

func WithAzureConfig added in v1.8.0

func WithAzureConfig(config *AzureConfig) ProviderConfig

func WithGCPConfig added in v1.8.0

func WithGCPConfig(config *GCPConfig) ProviderConfig

Jump to

Keyboard shortcuts

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