Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule pods on a nodegroup on which no concurrent actions are executed #7834

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions integration/data/iamserviceaccount-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ spec:
serviceAccountName: s3-reader
# use a shared volume
volumes: [{name: aws-credentials, emptyDir: {}}]
nodeSelector:
used-for: test-pods
initContainers:
- name: assume-role
image: atlassian/pipelines-awscli:1.16.185
Expand Down
2 changes: 2 additions & 0 deletions integration/data/podinfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ spec:
annotations:
prometheus.io/scrape: 'true'
spec:
nodeSelector:
used-for: test-pods
containers:
- name: podinfod
image: stefanprodan/podinfo:1.5.1@sha256:702633d438950f3675d0763a4ca6cfcf21a4d065cd7f470446c67607b1a26750
Expand Down
2 changes: 2 additions & 0 deletions integration/data/test-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
metadata:
labels: {test: dns}
spec:
nodeSelector:
used-for: test-pods
containers:
- image: tutum/dnsutils@sha256:d2244ad47219529f1003bd1513f5c99e71655353a3a63624ea9cb19f8393d5fe
name: dns-test-cluster
Expand Down
2 changes: 2 additions & 0 deletions integration/data/test-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
metadata:
labels: {test: http}
spec:
nodeSelector:
used-for: test-pods
containers:
- image: curlimages/curl@sha256:fa32ef426092b88ee0b569d6f81ab0203ee527692a94ec2e6ceb2fd0b6b2755c
name: https-test-eksctl
Expand Down
16 changes: 15 additions & 1 deletion integration/tests/crud/creategetdelete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func TestCRUD(t *testing.T) {
}

const (
deployNg = "ng-deploy"
deleteNg = "ng-delete"
taintsNg1 = "ng-taints-1"
taintsNg2 = "ng-taints-2"
Expand Down Expand Up @@ -131,6 +132,17 @@ var _ = SynchronizedBeforeSuite(func() []byte {
},
}
cfg.ManagedNodeGroups = []*api.ManagedNodeGroup{
{
NodeGroupBase: &api.NodeGroupBase{
Name: deployNg,
ScalingConfig: &api.ScalingConfig{
DesiredCapacity: aws.Int(5),
},
Labels: map[string]string{
"used-for": "test-pods",
},
},
},
{
NodeGroupBase: &api.NodeGroupBase{
Name: drainMng,
Expand Down Expand Up @@ -214,7 +226,7 @@ var _ = Describe("(Integration) Create, Get, Scale & Delete", func() {
Expect(session.ExitCode()).To(BeZero())
var stacks []*cfntypes.Stack
Expect(yaml.Unmarshal(session.Out.Contents(), &stacks)).To(Succeed())
Expect(stacks).To(HaveLen(6))
Expect(stacks).To(HaveLen(7))

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

Expect(names).To(ContainElements(
ContainSubstring(params.ClusterName+"-cluster"),
ContainSubstring(ngPrefix+deployNg),
ContainSubstring(ngPrefix+deleteNg),
ContainSubstring(ngPrefix+scaleSingleNg),
ContainSubstring(ngPrefix+scaleMultipleNg),
Expand Down Expand Up @@ -1196,6 +1209,7 @@ var _ = Describe("(Integration) Create, Get, Scale & Delete", func() {
"-o", "json",
"--cluster", params.ClusterName,
)).To(RunSuccessfullyWithOutputString(BeNodeGroupsWithNamesWhich(
ContainElement(deployNg),
ContainElement(taintsNg1),
ContainElement(taintsNg2),
ContainElement(scaleSingleNg),
Expand Down