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
expectedErr: errors.Wrapf(errors.New("VPC configuration required for creating nodegroups on clusters not owned by eksctl: vpc.subnets, vpc.id, vpc.securityGroup"), "loading VPC spec for cluster %q", "my-cluster"),
145
145
}),
146
146
147
+
Entry("when cluster is unowned and vpc.securityGroup contains external egress rules, it fails validation", ngEntry{
Description: aws.String("Allow control plane to communicate with a custom nodegroup on a custom port"),
152
+
FromPort: aws.Int32(8443),
153
+
ToPort: aws.Int32(8443),
154
+
GroupId: aws.String("sg-custom"),
155
+
IpProtocol: aws.String("https"),
156
+
IsEgress: aws.Bool(true),
157
+
SecurityGroupRuleId: aws.String("sgr-5"),
158
+
})
159
+
160
+
},
161
+
expectedErr: fmt.Errorf("loading VPC spec for cluster %q: vpc.securityGroup (sg-custom) has egress rules that were not attached by eksctl; vpc.securityGroup should not contain any external egress rules on a cluster not created by eksctl (rule ID: sgr-5)", "my-cluster"),
162
+
}),
163
+
164
+
Entry("when cluster is unowned and vpc.securityGroup contains no external egress rules, it passes validation but fails if DescribeImages fails", ngEntry{
Description: aws.String("Allow control plane to communicate with worker nodes in group ng-1 (kubelet and workload TCP ports"),
680
+
FromPort: aws.Int32(1025),
681
+
ToPort: aws.Int32(65535),
682
+
GroupId: sgID,
683
+
IpProtocol: aws.String("tcp"),
684
+
IsEgress: aws.Bool(true),
685
+
SecurityGroupRuleId: aws.String("sgr-1"),
686
+
},
687
+
{
688
+
Description: aws.String("Allow control plane to communicate with worker nodes in group ng-1 (workload using HTTPS port, commonly used with extension API servers"),
689
+
FromPort: aws.Int32(443),
690
+
ToPort: aws.Int32(443),
691
+
GroupId: sgID,
692
+
IpProtocol: aws.String("tcp"),
693
+
IsEgress: aws.Bool(true),
694
+
SecurityGroupRuleId: aws.String("sgr-2"),
695
+
},
696
+
{
697
+
Description: aws.String("Allow control plane to receive API requests from worker nodes in group ng-1"),
698
+
FromPort: aws.Int32(443),
699
+
ToPort: aws.Int32(443),
700
+
GroupId: sgID,
701
+
IpProtocol: aws.String("tcp"),
702
+
IsEgress: aws.Bool(false),
703
+
SecurityGroupRuleId: aws.String("sgr-3"),
704
+
},
705
+
{
706
+
Description: aws.String("Allow control plane to communicate with worker nodes in group ng-2 (workload using HTTPS port, commonly used with extension API servers"),
Description: gfnt.NewString("Allow control plane to communicate with "+desc+" (workloads using HTTPS port, commonly used with extension API servers)"),
181
-
IpProtocol: sgProtoTCP,
182
-
FromPort: sgPortHTTPS,
183
-
ToPort: sgPortHTTPS,
208
+
Description: gfnt.NewString(ControlPlaneEgressRuleDescriptionPrefix+desc+" (workloads using HTTPS port, commonly used with extension API servers)"),
Description: gfnt.NewString(fmt.Sprintf("[IngressInterCluster] Allow %s to communicate with control plane (kubelet and workload TCP ports)", description)),
Description: gfnt.NewString(fmt.Sprintf("[IngressInterClusterAPI] Allow %s to communicate with control plane (workloads using HTTPS port, commonly used with extension API servers)", description)),
0 commit comments