mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Make fake node as ready but unschedulable
This commit is contained in:
		@@ -53,15 +53,21 @@ var _ = SIGDescribe("Node Lifecycle", func() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		nodeClient := f.ClientSet.CoreV1().Nodes()
 | 
							nodeClient := f.ClientSet.CoreV1().Nodes()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// Create a fake node with a ready condition but unschedulable, so it won't be selected by
 | 
				
			||||||
 | 
							// the scheduler and won't be deleted by the cloud controller manager when the test runs on
 | 
				
			||||||
 | 
							// a specific cloud provider.
 | 
				
			||||||
		fakeNode := v1.Node{
 | 
							fakeNode := v1.Node{
 | 
				
			||||||
			ObjectMeta: metav1.ObjectMeta{
 | 
								ObjectMeta: metav1.ObjectMeta{
 | 
				
			||||||
				Name: "e2e-fake-node-" + utilrand.String(5),
 | 
									Name: "e2e-fake-node-" + utilrand.String(5),
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
 | 
								Spec: v1.NodeSpec{
 | 
				
			||||||
 | 
									Unschedulable: true,
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
			Status: v1.NodeStatus{
 | 
								Status: v1.NodeStatus{
 | 
				
			||||||
				Phase: v1.NodeRunning,
 | 
									Phase: v1.NodeRunning,
 | 
				
			||||||
				Conditions: []v1.NodeCondition{
 | 
									Conditions: []v1.NodeCondition{
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						Status:  v1.ConditionFalse,
 | 
											Status:  v1.ConditionTrue,
 | 
				
			||||||
						Message: "Set from e2e test",
 | 
											Message: "Set from e2e test",
 | 
				
			||||||
						Reason:  "E2E",
 | 
											Reason:  "E2E",
 | 
				
			||||||
						Type:    v1.NodeReady,
 | 
											Type:    v1.NodeReady,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user