You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 30, 2020. It is now read-only.
//The VPC will be created. No existing state to validate
59
59
returnnil
60
60
}
61
61
62
+
// TODO kube-aws should de-reference the vpc id from the stack output and continue validating with it
63
+
ifc.VPC.IDFromStackOutput!="" {
64
+
fmt.Printf("kube-aws doesn't support validating the vpc referenced by the stack output `%s`. Skipped validation of exsiting vpc state. The cluster creation may fail afterwards if the VPC isn't configured properly.", c.VPC.IDFromStackOutput)
returnnil, errors.New("internet gateway id can't be omitted when there're one or more managed public subnets in an existing VPC")
1103
1127
}
1104
1128
}
1105
1129
1106
1130
// All the subnets are explicitly/implicitly(they're public by default) configured to be "public".
1107
1131
// They're also configured to reuse existing route table(s).
1108
1132
// However, the IGW, which won't be applied to anywhere, is specified
1109
-
if (allPublic&&c.MapPublicIPs) && (c.RouteTableID!=""||allExistingRouteTable) &&c.InternetGatewayID!="" {
1110
-
returnnil, errors.New("internetGatewayId can't be specified when all the public subnets have existing route tables associated. kube-aws doesn't try to modify an exisinting route table to include a route to the internet gateway")
1133
+
if (allPublic&&c.MapPublicIPs) && (c.RouteTableID!=""||allExistingRouteTable) &&c.InternetGateway.HasIdentifier() {
1134
+
returnnil, errors.New("internet gateway id can't be specified when all the public subnets have existing route tables associated. kube-aws doesn't try to modify an exisinting route table to include a route to the internet gateway")
1111
1135
}
1112
1136
1113
1137
// All the subnets are explicitly configured to be "private" but the IGW, which won't be applied anywhere, is specified
1114
-
if (allPrivate||!c.MapPublicIPs) &&c.InternetGatewayID!="" {
1115
-
returnnil, errors.New("internetGatewayId can't be spcified when all the subnets are existing private subnets")
1138
+
if (allPrivate||!c.MapPublicIPs) &&c.InternetGateway.HasIdentifier() {
1139
+
returnnil, errors.New("internet gateway id can't be specified when all the subnets are existing private subnets")
// By design, kube-aws doesn't allow customizing the following settings among node pools.
11
11
//
12
12
// Every node pool imports subnets from the main stack and therefore there's no need for setting:
13
-
// * VPCID
14
-
// * InternetGatewayID
13
+
// * VPC.ID(FromStackOutput)
14
+
// * InternetGateway.ID(FromStackOutput)
15
15
// * RouteTableID
16
16
// * VPCCIDR
17
17
// * InstanceCIDR
18
18
// * MapPublicIPs
19
19
// * ElasticFileSystemID
20
-
ifc.VPCID!="" {
21
-
returnfmt.Errorf("although you can't customize `vpcId` per node pool but you did specify \"%s\" in your cluster.yaml", c.VPCID)
20
+
ifc.VPC.HasIdentifier() {
21
+
returnfmt.Errorf("although you can't customize VPC per node pool but you did specify \"%v\" in your cluster.yaml", c.VPC)
22
22
}
23
-
ifc.InternetGatewayID!="" {
24
-
returnfmt.Errorf("although you can't customize `internetGatewayId` per node pool but you did specify \"%s\" in your cluster.yaml", c.InternetGatewayID)
23
+
ifc.InternetGateway.HasIdentifier() {
24
+
returnfmt.Errorf("although you can't customize internet gateway per node pool but you did specify \"%v\" in your cluster.yaml", c.InternetGateway)
25
25
}
26
26
ifc.RouteTableID!="" {
27
27
returnfmt.Errorf("although you can't customize `routeTableId` per node pool but you did specify \"%s\" in your cluster.yaml", c.RouteTableID)
0 commit comments