mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	PodReasonUnschedulable is not a pod condition type
This commit is contained in:
		@@ -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,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user