Skip to content

Commit

Permalink
test: use default instance family / generation for Windows tests (#4590)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdeal committed Sep 8, 2023
1 parent dc0e340 commit 5166c71
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
14 changes: 10 additions & 4 deletions test/suites/integration/ami_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,21 @@ var _ = Describe("AMI", func() {
Taints: []v1.Taint{{Key: "example.com", Value: "value", Effect: "NoExecute"}},
StartupTaints: []v1.Taint{{Key: "example.com", Value: "value", Effect: "NoSchedule"}},
Requirements: []v1.NodeSelectorRequirement{
{
Key: v1alpha1.LabelInstanceCategory,
Operator: v1.NodeSelectorOpExists,
},
{
Key: v1.LabelOSStable,
Operator: v1.NodeSelectorOpIn,
Values: []string{string(v1.Windows)},
},
{
Key: v1alpha1.LabelInstanceCategory,
Operator: v1.NodeSelectorOpIn,
Values: []string{"c", "m", "r"},
},
{
Key: v1alpha1.LabelInstanceGeneration,
Operator: v1.NodeSelectorOpGt,
Values: []string{"2"},
},
},
})
pod := test.Pod(test.PodOptions{
Expand Down
25 changes: 19 additions & 6 deletions test/suites/integration/kubelet_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,30 @@ var _ = Describe("KubeletConfiguration Overrides", func() {
// Need to enable provisioner-level OS-scoping for now since DS evaluation is done off of the provisioner
// requirements, not off of the instance type options so scheduling can fail if provisioners aren't
// properly scoped
provisioner.Spec.Requirements = append(provisioner.Spec.Requirements, v1.NodeSelectorRequirement{
Key: v1.LabelOSStable,
Operator: v1.NodeSelectorOpIn,
Values: []string{string(v1.Windows)},
},
provisioner.Spec.Requirements = append(
provisioner.Spec.Requirements,
v1.NodeSelectorRequirement{
Key: v1.LabelOSStable,
Operator: v1.NodeSelectorOpIn,
Values: []string{string(v1.Windows)},
},
// TODO: remove this requirement once VPC RC rolls out m7a.* ENI data (https://github.com/aws/karpenter/issues/4472)
v1.NodeSelectorRequirement{
Key: v1alpha1.LabelInstanceFamily,
Operator: v1.NodeSelectorOpNotIn,
Values: []string{"m7a"},
})
},
v1.NodeSelectorRequirement{
Key: v1alpha1.LabelInstanceCategory,
Operator: v1.NodeSelectorOpIn,
Values: []string{"c", "m", "r"},
},
v1.NodeSelectorRequirement{
Key: v1alpha1.LabelInstanceGeneration,
Operator: v1.NodeSelectorOpGt,
Values: []string{"2"},
},
)
pod := test.Pod(test.PodOptions{
Image: aws.WindowsDefaultImage,
NodeSelector: map[string]string{
Expand Down

0 comments on commit 5166c71

Please sign in to comment.