PodReasonUnschedulable is not a pod condition type

This commit is contained in:
Sergey Kanzhelev 2020-08-05 03:06:37 +00:00
parent 044478c8d1
commit a84834fdcf
2 changed files with 5 additions and 4 deletions

View File

@ -17,7 +17,7 @@ limitations under the License.
package types
import (
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
)
// PodConditionsByKubelet is the list of pod conditions owned by kubelet
@ -25,7 +25,6 @@ var PodConditionsByKubelet = []v1.PodConditionType{
v1.PodScheduled,
v1.PodReady,
v1.PodInitialized,
v1.PodReasonUnschedulable,
v1.ContainersReady,
}

View File

@ -17,8 +17,9 @@ limitations under the License.
package types
import (
"k8s.io/api/core/v1"
"testing"
v1 "k8s.io/api/core/v1"
)
func TestPodConditionByKubelet(t *testing.T) {
@ -26,7 +27,7 @@ func TestPodConditionByKubelet(t *testing.T) {
v1.PodScheduled,
v1.PodReady,
v1.PodInitialized,
v1.PodReasonUnschedulable,
v1.ContainersReady,
}
for _, tc := range trueCases {
@ -37,6 +38,7 @@ func TestPodConditionByKubelet(t *testing.T) {
falseCases := []v1.PodConditionType{
v1.PodConditionType("abcd"),
v1.PodConditionType(v1.PodReasonUnschedulable),
}
for _, tc := range falseCases {