Skip to content

Commit

Permalink
test: pin ubuntu AMI (#5210)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdeal authored Dec 2, 2023
1 parent 264e628 commit 12f285e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/suites/integration/ami_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ var _ = Describe("AMI", func() {
})
It("should provision a node using the Ubuntu family", func() {
nodeClass.Spec.AMIFamily = &v1beta1.AMIFamilyUbuntu
// TODO (@jmdeal): Remove when the latest Ubuntu AMI is fixed
nodeClass.Spec.AMISelectorTerms = []v1beta1.AMISelectorTerm{
{
Name: "ubuntu-eks/k8s_1.28/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20231128",
},
}
// TODO: remove requirements after Ubuntu fixes bootstrap script issue w/
// new instance types not included in the max-pods.txt file. (https://github.com/aws/karpenter/issues/4472)
nodePool = coretest.ReplaceRequirements(nodePool,
Expand Down
8 changes: 8 additions & 0 deletions test/suites/integration/kubelet_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ var _ = Describe("KubeletConfiguration Overrides", func() {
DescribeTable("Linux AMIFamilies",
func(amiFamily *string) {
nodeClass.Spec.AMIFamily = amiFamily
if *amiFamily == v1beta1.AMIFamilyUbuntu {
// TODO (@jmdeal): Remove when the latest Ubuntu AMI is fixed
nodeClass.Spec.AMISelectorTerms = []v1beta1.AMISelectorTerm{
{
Name: "ubuntu-eks/k8s_1.28/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20231128",
},
}
}
pod := test.Pod(test.PodOptions{
NodeSelector: map[string]string{
v1.LabelOSStable: string(v1.Linux),
Expand Down

0 comments on commit 12f285e

Please sign in to comment.