aws

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsClient added in v1.2.3

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

func (*AwsClient) AuthorizeSecurityGroupEgress added in v1.2.3

func (client *AwsClient) AuthorizeSecurityGroupEgress(ctx context.Context, parameter ec2.AuthorizeSecurityGroupEgressInput) error

func (*AwsClient) AuthorizeSecurityGroupIngress added in v1.2.3

func (client *AwsClient) AuthorizeSecurityGroupIngress(ctx context.Context,
	parameter ec2.AuthorizeSecurityGroupIngressInput) error

func (*AwsClient) BeginCreateEKS added in v1.2.5

func (client *AwsClient) BeginCreateEKS(ctx context.Context, paramter *eks.CreateClusterInput) (*eks.CreateClusterOutput, error)

func (*AwsClient) BeginCreateIAM added in v1.2.5

func (client *AwsClient) BeginCreateIAM(ctx context.Context, node string, parameter *iam.CreateRoleInput) (*iam.CreateRoleOutput, error)

func (*AwsClient) BeginCreateNIC added in v1.2.3

func (client *AwsClient) BeginCreateNIC(ctx context.Context, parameter *ec2.CreateNetworkInterfaceInput) (*ec2.CreateNetworkInterfaceOutput, error)

func (*AwsClient) BeginCreateNetworkAcl added in v1.2.3

func (client *AwsClient) BeginCreateNetworkAcl(ctx context.Context, parameter ec2.CreateNetworkAclInput) (*ec2.CreateNetworkAclOutput, error)

func (*AwsClient) BeginCreateNodeGroup added in v1.2.5

func (client *AwsClient) BeginCreateNodeGroup(ctx context.Context, paramter *eks.CreateNodegroupInput) (*eks.CreateNodegroupOutput, error)

func (*AwsClient) BeginCreateSecurityGroup added in v1.2.3

func (client *AwsClient) BeginCreateSecurityGroup(ctx context.Context, parameter ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)

func (*AwsClient) BeginCreateSubNet added in v1.2.3

func (client *AwsClient) BeginCreateSubNet(ctx context.Context, subnetName string, parameter ec2.CreateSubnetInput) (*ec2.CreateSubnetOutput, error)

func (*AwsClient) BeginCreateVM added in v1.2.3

func (client *AwsClient) BeginCreateVM(ctx context.Context, parameter *ec2.RunInstancesInput) (*ec2.RunInstancesOutput, error)

func (*AwsClient) BeginCreateVirtNet added in v1.2.3

func (client *AwsClient) BeginCreateVirtNet(gatewayparameter ec2.CreateInternetGatewayInput, routeTableparameter ec2.CreateRouteTableInput, vpcid string) (*ec2.CreateRouteTableOutput, *ec2.CreateInternetGatewayOutput, error)

func (*AwsClient) BeginCreateVpc added in v1.2.3

func (client *AwsClient) BeginCreateVpc(parameter ec2.CreateVpcInput) (*ec2.CreateVpcOutput, error)

func (*AwsClient) BeginDeleteIAM added in v1.2.5

func (client *AwsClient) BeginDeleteIAM(ctx context.Context, parameter *iam.DeleteRoleInput, node string) (*iam.DeleteRoleOutput, error)

func (*AwsClient) BeginDeleteManagedCluster added in v1.2.5

func (client *AwsClient) BeginDeleteManagedCluster(ctx context.Context, parameter *eks.DeleteClusterInput) (*eks.DeleteClusterOutput, error)

func (*AwsClient) BeginDeleteNIC added in v1.2.3

func (client *AwsClient) BeginDeleteNIC(nicID string) error

func (*AwsClient) BeginDeleteNodeGroup added in v1.2.5

func (client *AwsClient) BeginDeleteNodeGroup(ctx context.Context, parameter *eks.DeleteNodegroupInput) (*eks.DeleteNodegroupOutput, error)

func (*AwsClient) BeginDeleteSecurityGrp added in v1.2.3

func (client *AwsClient) BeginDeleteSecurityGrp(ctx context.Context, securityGrpID string) error

func (*AwsClient) BeginDeleteSubNet added in v1.2.3

func (client *AwsClient) BeginDeleteSubNet(ctx context.Context, storage ksctlTypes.StorageFactory, subnetID string) error

func (*AwsClient) BeginDeleteVM added in v1.2.3

func (client *AwsClient) BeginDeleteVM(instanceID string) error

func (*AwsClient) BeginDeleteVirtNet added in v1.2.3

func (client *AwsClient) BeginDeleteVirtNet(ctx context.Context, storage ksctlTypes.StorageFactory) error

func (*AwsClient) BeginDeleteVpc added in v1.2.3

func (client *AwsClient) BeginDeleteVpc(ctx context.Context, storage ksctlTypes.StorageFactory) error

func (*AwsClient) DeleteSSHKey added in v1.2.3

func (client *AwsClient) DeleteSSHKey(ctx context.Context, name string) error

func (*AwsClient) DescribeCluster added in v1.2.5

func (client *AwsClient) DescribeCluster(ctx context.Context, parameter *eks.DescribeClusterInput) (*eks.DescribeClusterOutput, error)

func (*AwsClient) DescribeInstanceState added in v1.2.3

func (client *AwsClient) DescribeInstanceState(ctx context.Context, instanceId string) (*ec2.DescribeInstancesOutput, error)

func (*AwsClient) FetchLatestAMIWithFilter added in v1.2.3

func (client *AwsClient) FetchLatestAMIWithFilter(filter *ec2.DescribeImagesInput) (string, error)

func (*AwsClient) GetAvailabilityZones added in v1.2.3

func (client *AwsClient) GetAvailabilityZones() (*ec2.DescribeAvailabilityZonesOutput, error)

func (*AwsClient) GetKubeConfig added in v1.2.5

func (client *AwsClient) GetKubeConfig(ctx context.Context, clusterName string) (string, error)

func (*AwsClient) ImportKeyPair added in v1.2.3

func (client *AwsClient) ImportKeyPair(ctx context.Context, input *ec2.ImportKeyPairInput) error

func (*AwsClient) InitClient added in v1.2.3

func (client *AwsClient) InitClient(storage ksctlTypes.StorageFactory) error

func (*AwsClient) InstanceInitialWaiter added in v1.2.3

func (client *AwsClient) InstanceInitialWaiter(ctx context.Context, instanceID string) error

func (*AwsClient) ListK8sVersions added in v1.2.5

func (client *AwsClient) ListK8sVersions(ctx context.Context) ([]string, error)

func (*AwsClient) ListLocations added in v1.2.3

func (client *AwsClient) ListLocations() ([]string, error)

func (*AwsClient) ListVMTypes added in v1.2.3

func (client *AwsClient) ListVMTypes() (ec2.DescribeInstanceTypesOutput, error)

func (*AwsClient) ModifySubnetAttribute added in v1.2.3

func (client *AwsClient) ModifySubnetAttribute(ctx context.Context, i int) error

func (*AwsClient) ModifyVpcAttribute added in v1.2.3

func (client *AwsClient) ModifyVpcAttribute(ctx context.Context) error

func (*AwsClient) SetRegion added in v1.2.3

func (client *AwsClient) SetRegion(region string)

func (*AwsClient) SetVpc added in v1.2.3

func (client *AwsClient) SetVpc(vpc string) string

type AwsGo added in v1.1.4

type AwsGo interface {
	AuthorizeSecurityGroupIngress(ctx context.Context, parameter ec2.AuthorizeSecurityGroupIngressInput) error

	InitClient(storage ksctlTypes.StorageFactory) error

	ListLocations() ([]string, error)

	ListVMTypes() (ec2.DescribeInstanceTypesOutput, error)

	BeginCreateVpc(parameter ec2.CreateVpcInput) (*ec2.CreateVpcOutput, error)

	BeginCreateVirtNet(gatewayparameter ec2.CreateInternetGatewayInput, routeTableparameter ec2.CreateRouteTableInput, vpcid string) (*ec2.CreateRouteTableOutput, *ec2.CreateInternetGatewayOutput, error)

	BeginCreateSubNet(context context.Context, subnetName string, parameter ec2.CreateSubnetInput) (*ec2.CreateSubnetOutput, error)

	BeginDeleteVirtNet(ctx context.Context, storage ksctlTypes.StorageFactory) error

	BeginDeleteSubNet(ctx context.Context, storage ksctlTypes.StorageFactory, subnetID string) error

	DeleteSSHKey(ctx context.Context, name string) error

	BeginCreateVM(ctx context.Context, parameter *ec2.RunInstancesInput) (*ec2.RunInstancesOutput, error)

	BeginDeleteVM(vmname string) error

	BeginCreateNIC(ctx context.Context, parameter *ec2.CreateNetworkInterfaceInput) (*ec2.CreateNetworkInterfaceOutput, error)

	BeginDeleteNIC(nicID string) error

	BeginDeleteVpc(ctx context.Context, storage ksctlTypes.StorageFactory) error

	BeginCreateNetworkAcl(ctx context.Context, parameter ec2.CreateNetworkAclInput) (*ec2.CreateNetworkAclOutput, error)

	BeginCreateSecurityGroup(ctx context.Context, parameter ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)

	BeginDeleteSecurityGrp(ctx context.Context, securityGrpID string) error

	DescribeInstanceState(ctx context.Context, instanceId string) (*ec2.DescribeInstancesOutput, error)

	FetchLatestAMIWithFilter(filter *ec2.DescribeImagesInput) (string, error)
	GetAvailabilityZones() (*ec2.DescribeAvailabilityZonesOutput, error)
	AuthorizeSecurityGroupEgress(ctx context.Context, parameter ec2.AuthorizeSecurityGroupEgressInput) error

	ImportKeyPair(ctx context.Context, keypair *ec2.ImportKeyPairInput) error
	InstanceInitialWaiter(ctx context.Context, instanceInput string) error

	ModifyVpcAttribute(ctx context.Context) error
	ModifySubnetAttribute(ctx context.Context, i int) error

	BeginCreateEKS(ctx context.Context, parameter *eks.CreateClusterInput) (*eks.CreateClusterOutput, error)
	BeginCreateNodeGroup(ctx context.Context, paramter *eks.CreateNodegroupInput) (*eks.CreateNodegroupOutput, error)

	BeginDeleteNodeGroup(ctx context.Context, parameter *eks.DeleteNodegroupInput) (*eks.DeleteNodegroupOutput, error)
	BeginDeleteManagedCluster(ctx context.Context, parameter *eks.DeleteClusterInput) (*eks.DeleteClusterOutput, error)
	DescribeCluster(ctx context.Context, parameter *eks.DescribeClusterInput) (*eks.DescribeClusterOutput, error)

	BeginCreateIAM(ctx context.Context, node string, parameter *iam.CreateRoleInput) (*iam.CreateRoleOutput, error)
	BeginDeleteIAM(ctx context.Context, parameter *iam.DeleteRoleInput, node string) (*iam.DeleteRoleOutput, error)

	GetKubeConfig(ctx context.Context, cluster string) (string, error)

	ListK8sVersions(ctx context.Context) ([]string, error)

	SetRegion(string)
	SetVpc(string) string
}

func ProvideClient added in v1.1.4

func ProvideClient() AwsGo

type AwsProvider added in v1.1.4

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

func NewClient added in v1.2.0

func NewClient(parentCtx context.Context,
	meta types.Metadata,
	parentLogger types.LoggerFactory,
	state *storageTypes.StorageDocument,
	ClientOption func() AwsGo) (*AwsProvider, error)

func (*AwsProvider) Application added in v1.1.4

func (obj *AwsProvider) Application(s []string) bool

func (*AwsProvider) CNI added in v1.1.4

func (obj *AwsProvider) CNI(s string) (externalCNI bool)

func (*AwsProvider) CreateNetworkInterface added in v1.1.4

func (obj *AwsProvider) CreateNetworkInterface(ctx context.Context, storage ksctlTypes.StorageFactory, resName string, index int, role consts.KsctlRole) (string, error)

func (*AwsProvider) CreateSecurityGroup added in v1.1.4

func (obj *AwsProvider) CreateSecurityGroup(name string, role consts.KsctlRole) (string, error)

func (*AwsProvider) CreateSubnet added in v1.1.4

func (obj *AwsProvider) CreateSubnet(ctx context.Context, storage ksctlTypes.StorageFactory, subnetName string) error

func (*AwsProvider) CreateUploadSSHKeyPair added in v1.1.4

func (obj *AwsProvider) CreateUploadSSHKeyPair(storage types.StorageFactory) error

func (*AwsProvider) CreateVirtualNetwork added in v1.1.4

func (obj *AwsProvider) CreateVirtualNetwork(ctx context.Context, storage ksctlTypes.StorageFactory, resName string) error

func (*AwsProvider) Credential added in v1.2.0

func (cloud *AwsProvider) Credential(storage types.StorageFactory) error

func (*AwsProvider) DelFirewall added in v1.1.4

func (obj *AwsProvider) DelFirewall(storage ksctlTypes.StorageFactory) error

func (*AwsProvider) DelManagedCluster added in v1.1.4

func (obj *AwsProvider) DelManagedCluster(storage types.StorageFactory) error

func (*AwsProvider) DelNetwork added in v1.1.4

func (obj *AwsProvider) DelNetwork(storage ksctlTypes.StorageFactory) error

func (*AwsProvider) DelSSHKeyPair added in v1.1.4

func (obj *AwsProvider) DelSSHKeyPair(storage types.StorageFactory) error

func (*AwsProvider) DelVM added in v1.1.4

func (obj *AwsProvider) DelVM(storage ksctlTypes.StorageFactory, index int) error

func (*AwsProvider) DeleteNetworkInterface added in v1.1.4

func (obj *AwsProvider) DeleteNetworkInterface(ctx context.Context, storage ksctlTypes.StorageFactory, index int, role consts.KsctlRole) error

func (*AwsProvider) DeleteSubnet added in v1.1.4

func (obj *AwsProvider) DeleteSubnet(ctx context.Context, storage ksctlTypes.StorageFactory, subnetID []string) error

func (*AwsProvider) DeleteVpc added in v1.1.4

func (obj *AwsProvider) DeleteVpc(ctx context.Context, storage ksctlTypes.StorageFactory, resName string) error

func (*AwsProvider) GetHostNameAllWorkerNode added in v1.1.4

func (obj *AwsProvider) GetHostNameAllWorkerNode() []string

func (*AwsProvider) GetKubeconfig added in v1.2.5

func (obj *AwsProvider) GetKubeconfig(storage types.StorageFactory) (*string, error)

func (*AwsProvider) GetRAWClusterInfos added in v1.2.0

func (obj *AwsProvider) GetRAWClusterInfos(storage types.StorageFactory) ([]cloudcontrolres.AllClusterData, error)

func (*AwsProvider) GetStateFile added in v1.1.4

func (obj *AwsProvider) GetStateFile(factory types.StorageFactory) (string, error)

func (*AwsProvider) GetStateForHACluster added in v1.1.4

func (obj *AwsProvider) GetStateForHACluster(storage types.StorageFactory) (cloudcontrolres.CloudResourceState, error)

func (*AwsProvider) InitState added in v1.1.4

func (obj *AwsProvider) InitState(storage types.StorageFactory, opration consts.KsctlOperation) error

func (*AwsProvider) IsPresent added in v1.1.4

func (obj *AwsProvider) IsPresent(storage types.StorageFactory) error

func (*AwsProvider) ManagedK8sVersion added in v1.2.0

func (obj *AwsProvider) ManagedK8sVersion(ver string) types.CloudFactory

func (*AwsProvider) Name added in v1.1.4

func (obj *AwsProvider) Name(resName string) types.CloudFactory

func (*AwsProvider) NewFirewall added in v1.1.4

func (obj *AwsProvider) NewFirewall(storage ksctlTypes.StorageFactory) error

func (*AwsProvider) NewManagedCluster added in v1.1.4

func (obj *AwsProvider) NewManagedCluster(storage types.StorageFactory, noOfNode int) error

func (*AwsProvider) NewNetwork added in v1.1.4

func (obj *AwsProvider) NewNetwork(storage ksctlTypes.StorageFactory) error

func (*AwsProvider) NewVM added in v1.1.4

func (obj *AwsProvider) NewVM(storage ksctlTypes.StorageFactory, index int) error

func (*AwsProvider) NoOfControlPlane added in v1.1.4

func (obj *AwsProvider) NoOfControlPlane(no int, setter bool) (int, error)

func (*AwsProvider) NoOfDataStore added in v1.1.4

func (obj *AwsProvider) NoOfDataStore(no int, setter bool) (int, error)

func (*AwsProvider) NoOfWorkerPlane added in v1.1.4

func (obj *AwsProvider) NoOfWorkerPlane(storage types.StorageFactory, no int, setter bool) (int, error)

func (*AwsProvider) Role added in v1.1.4

func (obj *AwsProvider) Role(resRole consts.KsctlRole) types.CloudFactory

func (*AwsProvider) SupportForApplications added in v1.1.4

func (obj *AwsProvider) SupportForApplications() bool

func (*AwsProvider) VMType added in v1.1.4

func (obj *AwsProvider) VMType(size string) types.CloudFactory

func (*AwsProvider) Visibility added in v1.1.4

func (obj *AwsProvider) Visibility(toBePublic bool) types.CloudFactory

type KubeConfigData added in v1.2.5

type KubeConfigData struct {
	ClusterEndpoint          string
	CertificateAuthorityData string
	ClusterName              string
	Token                    string
}

type STSTokenRetriever added in v1.2.5

type STSTokenRetriever struct {
	PresignClient StsPresignClientInteface
}

func NewSTSTokenRetriver added in v1.2.5

func NewSTSTokenRetriver(client StsPresignClientInteface) STSTokenRetriever

func (*STSTokenRetriever) GetToken added in v1.2.5

func (s *STSTokenRetriever) GetToken(ctx context.Context, clusterName string, cfg aws.Config) (string, error)

type StsPresignClientInteface added in v1.2.5

type StsPresignClientInteface interface {
	PresignGetCallerIdentity(ctx context.Context, input *sts.GetCallerIdentityInput, options ...func(*sts.PresignOptions)) (*v4.PresignedHTTPRequest, error)
}

Jump to

Keyboard shortcuts

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