Documentation ¶
Index ¶
- func CleanupNetworkInterfaces(ec2API ec2iface.EC2API, spec *api.ClusterConfig) error
- func EnsureMapPublicIPOnLaunchEnabled(ec2API ec2iface.EC2API, subnetIDs []string) error
- func ImportSubnets(ec2API ec2iface.EC2API, spec *api.ClusterConfig, topology api.SubnetTopology, ...) error
- func ImportSubnetsFromIDList(ec2API ec2iface.EC2API, spec *api.ClusterConfig, topology api.SubnetTopology, ...) error
- func ImportSubnetsFromSpec(provider api.ClusterProvider, spec *api.ClusterConfig) error
- func SelectNodeGroupSubnets(nodegroupAZs, nodegroupSubnets []string, subnets api.AZSubnetMapping, ...) ([]string, error)
- func SetSubnets(vpc *api.ClusterVPC, availabilityZones []string) error
- func SplitInto16(parent *net.IPNet) ([]*net.IPNet, error)
- func SplitInto8(parent *net.IPNet) ([]*net.IPNet, error)
- func UseEndpointAccessFromCluster(provider api.ClusterProvider, spec *api.ClusterConfig) error
- func UseFromClusterStack(provider api.ClusterProvider, stack *cfn.Stack, spec *api.ClusterConfig) error
- func ValidateExistingPublicSubnets(provider api.ClusterProvider, vpcID string, subnetIDs []string) error
- func ValidateLegacySubnetsForNodeGroups(spec *api.ClusterConfig, provider api.ClusterProvider) error
- type Importer
- type SpecConfigImporter
- func (si *SpecConfigImporter) ClusterSecurityGroup() *gfnt.Value
- func (si *SpecConfigImporter) ControlPlaneSecurityGroup() *gfnt.Value
- func (si *SpecConfigImporter) SecurityGroups() gfnt.Slice
- func (si *SpecConfigImporter) SharedNodeSecurityGroup() *gfnt.Value
- func (si *SpecConfigImporter) SubnetsPrivate() *gfnt.Value
- func (si *SpecConfigImporter) SubnetsPublic() *gfnt.Value
- func (si *SpecConfigImporter) VPC() *gfnt.Value
- type StackConfigImporter
- func (si *StackConfigImporter) ClusterSecurityGroup() *gfnt.Value
- func (si *StackConfigImporter) ControlPlaneSecurityGroup() *gfnt.Value
- func (si *StackConfigImporter) SecurityGroups() gfnt.Slice
- func (si *StackConfigImporter) SharedNodeSecurityGroup() *gfnt.Value
- func (si *StackConfigImporter) SubnetsPrivate() *gfnt.Value
- func (si *StackConfigImporter) SubnetsPublic() *gfnt.Value
- func (si *StackConfigImporter) VPC() *gfnt.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupNetworkInterfaces ¶
func CleanupNetworkInterfaces(ec2API ec2iface.EC2API, spec *api.ClusterConfig) error
CleanupNetworkInterfaces finds and deletes any dangling ENIs
func EnsureMapPublicIPOnLaunchEnabled ¶
EnsureMapPublicIPOnLaunchEnabled will enable MapPublicIpOnLaunch in EC2 for all given subnet IDs
func ImportSubnets ¶
func ImportSubnets(ec2API ec2iface.EC2API, spec *api.ClusterConfig, topology api.SubnetTopology, subnets []*ec2.Subnet) error
ImportSubnets will update spec with subnets, if VPC ID/CIDR is unknown it will use provider to call describeVPC based on the VPC ID of the first subnet; all subnets must be in the same VPC NOTE: it does respect all fields set in spec.VPC, and will error if there is a mismatch of local vs remote states
func ImportSubnetsFromIDList ¶ added in v0.39.0
func ImportSubnetsFromIDList(ec2API ec2iface.EC2API, spec *api.ClusterConfig, topology api.SubnetTopology, subnetIDs []string) error
ImportSubnetsFromIDList will update spec with subnets _only specified by ID_ then pass resulting subnets to ImportSubnets NOTE: it does respect all fields set in spec.VPC, and will error if there is a mismatch of local vs remote states
func ImportSubnetsFromSpec ¶ added in v0.39.0
func ImportSubnetsFromSpec(provider api.ClusterProvider, spec *api.ClusterConfig) error
ImportSubnetsFromSpec will update spec with subnets, it will call describeSubnets first, then pass resulting subnets to ImportSubnets NOTE: it does respect all fields set in spec.VPC, and will error if there is a mismatch of local vs remote states
func SelectNodeGroupSubnets ¶
func SetSubnets ¶
func SetSubnets(vpc *api.ClusterVPC, availabilityZones []string) error
SetSubnets defines CIDRs for each of the subnets, it must be called after SetAvailabilityZones
func UseEndpointAccessFromCluster ¶
func UseEndpointAccessFromCluster(provider api.ClusterProvider, spec *api.ClusterConfig) error
UseEndpointAccessFromCluster retrieves the Cluster's endpoint access configuration via the SDK as the CloudFormation Stack doesn't support that configuration currently
func UseFromClusterStack ¶ added in v0.40.0
func UseFromClusterStack(provider api.ClusterProvider, stack *cfn.Stack, spec *api.ClusterConfig) error
UseFromClusterStack retrieves the VPC configuration from an existing cluster based on stack outputs NOTE: it doesn't expect any fields in spec.VPC to be set, the remote state is treated as the source of truth
func ValidateExistingPublicSubnets ¶
func ValidateExistingPublicSubnets(provider api.ClusterProvider, vpcID string, subnetIDs []string) error
ValidateExistingPublicSubnets makes sure that subnets have the property MapPublicIpOnLaunch enabled
func ValidateLegacySubnetsForNodeGroups ¶
func ValidateLegacySubnetsForNodeGroups(spec *api.ClusterConfig, provider api.ClusterProvider) error
Types ¶
type SpecConfigImporter ¶ added in v0.40.0
type SpecConfigImporter struct {
// contains filtered or unexported fields
}
SpecConfigImporter returns VPC info based on the ClusterConfig Spec
func NewSpecConfigImporter ¶ added in v0.40.0
func NewSpecConfigImporter(securityGroup string, vpc *api.ClusterVPC) *SpecConfigImporter
NewSpecConfigImporter creates a new SpecConfigImporter instance
func (*SpecConfigImporter) ClusterSecurityGroup ¶ added in v0.40.0
func (si *SpecConfigImporter) ClusterSecurityGroup() *gfnt.Value
ClusterSecurityGroup returns the gftn value of the default cluser security group
func (*SpecConfigImporter) ControlPlaneSecurityGroup ¶ added in v0.40.0
func (si *SpecConfigImporter) ControlPlaneSecurityGroup() *gfnt.Value
ControlPlaneSecurityGroup returns the gftn value of the cluster config VPC securityGroup
func (*SpecConfigImporter) SecurityGroups ¶ added in v0.40.0
func (si *SpecConfigImporter) SecurityGroups() gfnt.Slice
SecurityGroups returns a gftn slice of the ControlPlaneSecurityGroup and the ClusterSecurityGroup
func (*SpecConfigImporter) SharedNodeSecurityGroup ¶ added in v0.40.0
func (si *SpecConfigImporter) SharedNodeSecurityGroup() *gfnt.Value
SharedNodeSecurityGroup returns the gftn value of the cluster config VPC sharedNodeSecurityGroup if it is set. If not, it returns the default cluster security group
func (*SpecConfigImporter) SubnetsPrivate ¶ added in v0.40.0
func (si *SpecConfigImporter) SubnetsPrivate() *gfnt.Value
SubnetsPrivate returns a gftn string slice of the Private subnets from the cluster config VPC subnets spec
func (*SpecConfigImporter) SubnetsPublic ¶ added in v0.40.0
func (si *SpecConfigImporter) SubnetsPublic() *gfnt.Value
SubnetsPublic returns a gftn string slice of the Public subnets from the cluster config VPC subnets spec
func (*SpecConfigImporter) VPC ¶ added in v0.40.0
func (si *SpecConfigImporter) VPC() *gfnt.Value
VPC returns the gftn value of the cluster config VPC ID
type StackConfigImporter ¶ added in v0.40.0
type StackConfigImporter struct {
// contains filtered or unexported fields
}
StackConfigImporter returns VPC info based on the Cluster Stack
func NewStackConfigImporter ¶ added in v0.40.0
func NewStackConfigImporter(clusterStackName string) *StackConfigImporter
NewStackConfigImporter creates a new StackConfigImporter instance
func (*StackConfigImporter) ClusterSecurityGroup ¶ added in v0.40.0
func (si *StackConfigImporter) ClusterSecurityGroup() *gfnt.Value
ClusterSecurityGroup returns a gftn value based on the cluster stack name and the default security group from the cluster stack output
func (*StackConfigImporter) ControlPlaneSecurityGroup ¶ added in v0.40.0
func (si *StackConfigImporter) ControlPlaneSecurityGroup() *gfnt.Value
ControlPlaneSecurityGroup returns a gftn value based on the cluster stack name and the control plane security group from the cluster stack output
func (*StackConfigImporter) SecurityGroups ¶ added in v0.40.0
func (si *StackConfigImporter) SecurityGroups() gfnt.Slice
SecurityGroups returns a gftn slice based on the cluster stack name and the default security group from the cluster stack output
func (*StackConfigImporter) SharedNodeSecurityGroup ¶ added in v0.40.0
func (si *StackConfigImporter) SharedNodeSecurityGroup() *gfnt.Value
SharedNodeSecurityGroup returns a gftn value based on the cluster stack name and the shared node security group from the cluster stack output
func (*StackConfigImporter) SubnetsPrivate ¶ added in v0.40.0
func (si *StackConfigImporter) SubnetsPrivate() *gfnt.Value
SubnetsPrivate returns a gftn value based on the cluster stack name and the public subnets from the cluster stack output
func (*StackConfigImporter) SubnetsPublic ¶ added in v0.40.0
func (si *StackConfigImporter) SubnetsPublic() *gfnt.Value
SubnetsPublic returns a gftn value based on the cluster stack name and the public subnets from the cluster stack output
func (*StackConfigImporter) VPC ¶ added in v0.40.0
func (si *StackConfigImporter) VPC() *gfnt.Value
VPC returns a gftn value based on the cluster stack name and the VPC from the cluster stack output