Skip to content

Commit

Permalink
checkResourceTolerations check for NoExecute
Browse files Browse the repository at this point in the history
  • Loading branch information
knelasevero committed Apr 18, 2024
1 parent c841a32 commit d70a33e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/cloud/cloud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ func checkResourceTolerations(t *testing.T, podSpec corev1.PodSpec) {
Operator: corev1.TolerationOpExists,
Effect: corev1.TaintEffectNoSchedule,
}
noExecuteTaint := corev1.Toleration{
Operator: corev1.TolerationOpExists,
Effect: corev1.TaintEffectNoExecute,
}

tolerations := podSpec.Tolerations

Expand All @@ -422,7 +426,8 @@ func checkResourceTolerations(t *testing.T, podSpec corev1.PodSpec) {
ContainElement(notReadyTaint),
),
ContainElement(noScheduleTaint),
), "PodSpec must either contain the uninitialized and not-ready tolerations, or tolerate any NoSchedule taint")
ContainElement(noExecuteTaint),
), "PodSpec must either contain the uninitialized and not-ready tolerations, or tolerate any NoSchedule/NoExecute taints")
}

func checkHostNetwork(t *testing.T, podSpec corev1.PodSpec) {
Expand Down

0 comments on commit d70a33e

Please sign in to comment.