Skip to content

Commit 4b62d1a

Browse files
authored
Schedule pods on a nodegroup on which no concurrent actions are executed (#7834)
* Schedule pods on a nodegroup on which no concurrent actions are executed * patch test assertions
1 parent 1cecd77 commit 4b62d1a

File tree

5 files changed

+23
-1
lines changed

5 files changed

+23
-1
lines changed

integration/data/iamserviceaccount-checker.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ spec:
1818
serviceAccountName: s3-reader
1919
# use a shared volume
2020
volumes: [{name: aws-credentials, emptyDir: {}}]
21+
nodeSelector:
22+
used-for: test-pods
2123
initContainers:
2224
- name: assume-role
2325
image: atlassian/pipelines-awscli:1.16.185

integration/data/podinfo.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ spec:
1717
annotations:
1818
prometheus.io/scrape: 'true'
1919
spec:
20+
nodeSelector:
21+
used-for: test-pods
2022
containers:
2123
- name: podinfod
2224
image: stefanprodan/podinfo:1.5.1@sha256:702633d438950f3675d0763a4ca6cfcf21a4d065cd7f470446c67607b1a26750

integration/data/test-dns.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ spec:
1010
metadata:
1111
labels: {test: dns}
1212
spec:
13+
nodeSelector:
14+
used-for: test-pods
1315
containers:
1416
- image: tutum/dnsutils@sha256:d2244ad47219529f1003bd1513f5c99e71655353a3a63624ea9cb19f8393d5fe
1517
name: dns-test-cluster

integration/data/test-http.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ spec:
1010
metadata:
1111
labels: {test: http}
1212
spec:
13+
nodeSelector:
14+
used-for: test-pods
1315
containers:
1416
- image: curlimages/curl@sha256:fa32ef426092b88ee0b569d6f81ab0203ee527692a94ec2e6ceb2fd0b6b2755c
1517
name: https-test-eksctl

integration/tests/crud/creategetdelete_test.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func TestCRUD(t *testing.T) {
6666
}
6767

6868
const (
69+
deployNg = "ng-deploy"
6970
deleteNg = "ng-delete"
7071
taintsNg1 = "ng-taints-1"
7172
taintsNg2 = "ng-taints-2"
@@ -131,6 +132,17 @@ var _ = SynchronizedBeforeSuite(func() []byte {
131132
},
132133
}
133134
cfg.ManagedNodeGroups = []*api.ManagedNodeGroup{
135+
{
136+
NodeGroupBase: &api.NodeGroupBase{
137+
Name: deployNg,
138+
ScalingConfig: &api.ScalingConfig{
139+
DesiredCapacity: aws.Int(5),
140+
},
141+
Labels: map[string]string{
142+
"used-for": "test-pods",
143+
},
144+
},
145+
},
134146
{
135147
NodeGroupBase: &api.NodeGroupBase{
136148
Name: drainMng,
@@ -214,7 +226,7 @@ var _ = Describe("(Integration) Create, Get, Scale & Delete", func() {
214226
Expect(session.ExitCode()).To(BeZero())
215227
var stacks []*cfntypes.Stack
216228
Expect(yaml.Unmarshal(session.Out.Contents(), &stacks)).To(Succeed())
217-
Expect(stacks).To(HaveLen(6))
229+
Expect(stacks).To(HaveLen(7))
218230

219231
var (
220232
names, descriptions []string
@@ -227,6 +239,7 @@ var _ = Describe("(Integration) Create, Get, Scale & Delete", func() {
227239

228240
Expect(names).To(ContainElements(
229241
ContainSubstring(params.ClusterName+"-cluster"),
242+
ContainSubstring(ngPrefix+deployNg),
230243
ContainSubstring(ngPrefix+deleteNg),
231244
ContainSubstring(ngPrefix+scaleSingleNg),
232245
ContainSubstring(ngPrefix+scaleMultipleNg),
@@ -1196,6 +1209,7 @@ var _ = Describe("(Integration) Create, Get, Scale & Delete", func() {
11961209
"-o", "json",
11971210
"--cluster", params.ClusterName,
11981211
)).To(RunSuccessfullyWithOutputString(BeNodeGroupsWithNamesWhich(
1212+
ContainElement(deployNg),
11991213
ContainElement(taintsNg1),
12001214
ContainElement(taintsNg2),
12011215
ContainElement(scaleSingleNg),

0 commit comments

Comments
 (0)