awslabs/amazon-eks-ami

[k8s>=1.30] switch off NodeSwap feature gate for AL2 based images

Closed this issue · 4 comments

dims commented

As of kubernetes/kubernetes#122745, NodeSwap has been switched to true by default. Since we know that NodeSwap works only with cgroupv2 and AL2 defaults to cgroupv1, can we switch off the feature gate?

See kubernetes/test-infra#32876 for context where we had to do this to ensure CI jobs are stabilized with AL2.

cc @cartermckinnon @njtran

We'd need to add some logic for older (and future) k8s versions where the feature flag doesn't exist, and since using swap requires you to disable failOnSwap and configure the swap volumes explicitly, I'm not sure it makes sense to have this additional guardrail/callout. @ndbaker1 what do you think here?

add some logic for older (and future) k8s versions where the feature flag doesn't exist

we don't need to do anything for older version right?

If we already had logic in place to enforce NodeSwap=false it would make sense, but sounds like the default from the PR is NoSwap which works as expected?

I'm also not eager to track more featureGates besides the ones we currently set (which are all related to credentials afaict)

we don't need to do anything for older version right?

the feature gate was added in 1.22, so we can't specify it for 1.21 or kubelet will complain. When the feature gate is removed in the future, we'll have to come back and add a check for that boundary as well

If we already had logic in place to enforce NodeSwap=false it would make sense, but sounds like the default from the PR is NoSwap which works as expected?

yeah that's my thinking, the feature gate default changing was a no-op anyway, since you have to opt-in with several other config options

I think we'll leave things as-is for now