File tree Expand file tree Collapse file tree 4 files changed +22
-4
lines changed Expand file tree Collapse file tree 4 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ require (
1111 github.com/aws/aws-sdk-go-v2 v1.36.3
1212 github.com/aws/aws-sdk-go-v2/config v1.29.12
1313 github.com/aws/aws-sdk-go-v2/credentials v1.17.65
14- github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.3
14+ github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.4
1515 github.com/aws/aws-sdk-go-v2/service/cloudformation v1.59.2
1616 github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.48.4
1717 github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.47.3
Original file line number Diff line number Diff line change @@ -124,8 +124,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d
124124github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 /go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo =
125125github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.33 h1:/frG8aV09yhCVSOEC2pzktflJJO48NwY3xntHBwxHiA =
126126github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.33 /go.mod h1:8vwASlAcV366M+qxZnjNzCjeastk1Rt1bpSRaGZanGU =
127- github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.3 h1:QsKdBxtC8csnKt5BbV7D1op4Nf13p2YkTJIkppaCakw =
128- github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.3 /go.mod h1:CDqMoc3KRdZJ8qziW96J35lKH01Wq3B2aihtHj2JbRs =
127+ github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.4 h1:vzLD0FyNU4uxf2QE5UDG0jSEitiJXbVEUwf2Sk3usF4 =
128+ github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.4 /go.mod h1:CDqMoc3KRdZJ8qziW96J35lKH01Wq3B2aihtHj2JbRs =
129129github.com/aws/aws-sdk-go-v2/service/cloudformation v1.59.2 h1:o9cuZdZlI9VWMqsNa2mnf2IRsFAROHnaYA1BW3lHGuY =
130130github.com/aws/aws-sdk-go-v2/service/cloudformation v1.59.2 /go.mod h1:penaZKzGmqHGZId4EUCBIW/f9l4Y7hQ5NKd45yoCYuI =
131131github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.48.4 h1:pQpinmWv9jEisDR6/DccOf2cXdAf/CAwQ39nfJfJDlE =
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ func IsSchedulableOnFargate(profiles []*api.FargateProfile) bool {
4343}
4444
4545func selectsCoreDNS (selector api.FargateProfileSelector ) bool {
46- return selector .Namespace == Namespace && len (selector .Labels ) == 0
46+ return selector .Namespace == Namespace && ( len (selector .Labels ) == 0 || selector . Labels [ "eks.amazonaws.com/component" ] == Name )
4747}
4848
4949// IsScheduledOnFargate checks if EKS' coredns is scheduled onto Fargate.
Original file line number Diff line number Diff line change 7373 },
7474 }
7575
76+ profileSelectingCoreDNSWithComponentLabel = []* api.FargateProfile {
77+ {
78+ Name : "selecting-coredns-with-label" ,
79+ Selectors : []api.FargateProfileSelector {
80+ {
81+ Namespace : "kube-system" ,
82+ Labels : map [string ]string {
83+ "eks.amazonaws.com/component" : "coredns" ,
84+ },
85+ },
86+ },
87+ },
88+ }
89+
7690 profileNotSelectingCoreDNSBecauseOfNamespace = []* api.FargateProfile {
7791 {
7892 Name : "not-selecting-coredns-because-of-namespace" ,
@@ -97,6 +111,10 @@ var _ = Describe("coredns", func() {
97111 Expect (coredns .IsSchedulableOnFargate (multipleProfilesWithOneSelectingCoreDNS )).To (BeTrue ())
98112 })
99113
114+ It ("should return true when a Fargate profile matches kube-system and has the CoreDNS component label" , func () {
115+ Expect (coredns .IsSchedulableOnFargate (profileSelectingCoreDNSWithComponentLabel )).To (BeTrue ())
116+ })
117+
100118 It ("should return true when provided the default Fargate profile" , func () {
101119 cfg := api .NewClusterConfig ()
102120 cfg .SetDefaultFargateProfile ()
You can’t perform that action at this time.
0 commit comments