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 (
11
11
github.com/aws/aws-sdk-go-v2 v1.36.3
12
12
github.com/aws/aws-sdk-go-v2/config v1.29.12
13
13
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
15
15
github.com/aws/aws-sdk-go-v2/service/cloudformation v1.59.2
16
16
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.48.4
17
17
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
124
124
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 /go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo =
125
125
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.33 h1:/frG8aV09yhCVSOEC2pzktflJJO48NwY3xntHBwxHiA =
126
126
github.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 =
129
129
github.com/aws/aws-sdk-go-v2/service/cloudformation v1.59.2 h1:o9cuZdZlI9VWMqsNa2mnf2IRsFAROHnaYA1BW3lHGuY =
130
130
github.com/aws/aws-sdk-go-v2/service/cloudformation v1.59.2 /go.mod h1:penaZKzGmqHGZId4EUCBIW/f9l4Y7hQ5NKd45yoCYuI =
131
131
github.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 {
43
43
}
44
44
45
45
func 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 )
47
47
}
48
48
49
49
// IsScheduledOnFargate checks if EKS' coredns is scheduled onto Fargate.
Original file line number Diff line number Diff line change 73
73
},
74
74
}
75
75
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
+
76
90
profileNotSelectingCoreDNSBecauseOfNamespace = []* api.FargateProfile {
77
91
{
78
92
Name : "not-selecting-coredns-because-of-namespace" ,
@@ -97,6 +111,10 @@ var _ = Describe("coredns", func() {
97
111
Expect (coredns .IsSchedulableOnFargate (multipleProfilesWithOneSelectingCoreDNS )).To (BeTrue ())
98
112
})
99
113
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
+
100
118
It ("should return true when provided the default Fargate profile" , func () {
101
119
cfg := api .NewClusterConfig ()
102
120
cfg .SetDefaultFargateProfile ()
You can’t perform that action at this time.
0 commit comments