Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 179 for MainKt (0.13 sec)

  1. pkg/util/taints/taints_test.go

    			expectedTaints: []v1.Taint{taint, taintNew},
    		},
    		{
    			name: "add duplicate taint",
    			node: &v1.Node{
    				Spec: v1.NodeSpec{Taints: []v1.Taint{taint}},
    			},
    			taint:          &taint,
    			expectedUpdate: false,
    			expectedTaints: []v1.Taint{taint},
    		},
    		{
    			name: "update taint value",
    			node: &v1.Node{
    				Spec: v1.NodeSpec{Taints: []v1.Taint{taint}},
    			},
    			taint:          &taintUpdateValue,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 09:23:35 UTC 2022
    - 22.6K bytes
    - Viewed (0)
  2. pkg/util/taints/taints.go

    	for _, taint := range taints {
    		if fn(&taint) {
    			res = append(res, taint)
    		}
    	}
    
    	return res
    }
    
    // CheckTaintValidation checks if the given taint is valid.
    // Returns error if the given taint is invalid.
    func CheckTaintValidation(taint v1.Taint) error {
    	if errs := validation.IsQualifiedName(taint.Key); len(errs) > 0 {
    		return fmt.Errorf("invalid taint key: %s", strings.Join(errs, "; "))
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 09:23:35 UTC 2022
    - 8.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/api/core/v1/toleration.go

    //     this combination means to match all taint values and all taint keys.
    func (t *Toleration) ToleratesTaint(taint *Taint) bool {
    	if len(t.Effect) > 0 && t.Effect != taint.Effect {
    		return false
    	}
    
    	if len(t.Key) > 0 && t.Key != taint.Key {
    		return false
    	}
    
    	// TODO: Use proper defaulting when Toleration becomes a field of PodSpec
    	switch t.Operator {
    	// empty operator means Equal
    	case "", TolerationOpEqual:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Dec 18 04:27:38 UTC 2022
    - 2K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/helper/taint_test.go

    	tests := []struct {
    		name     string
    		taint    *v1.Taint
    		expected bool
    	}{
    		{
    			name: "should include the taints with NoSchedule effect",
    			taint: &v1.Taint{
    				Effect: v1.TaintEffectNoSchedule,
    			},
    			expected: true,
    		},
    		{
    			name: "should include the taints with NoExecute effect",
    			taint: &v1.Taint{
    				Effect: v1.TaintEffectNoExecute,
    			},
    			expected: true,
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 10 01:04:30 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  5. tests/integration/ambient/untaint/main_test.go

    	if err != nil {
    		// TODO: log
    		return
    	}
    
    	for _, node := range nodes.Items {
    		var taints []corev1.Taint
    		for _, taint := range node.Spec.Taints {
    			if taint.Key == "cni.istio.io/not-ready" {
    				continue
    			}
    			taints = append(taints, taint)
    		}
    		if len(taints) != len(node.Spec.Taints) {
    			node.Spec.Taints = taints
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 14:58:41 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go

    			node: nodeWithTaints("nodeA", []v1.Taint{{Key: "foo", Value: "bar", Effect: "NoSchedule"}}),
    			wantStatus: framework.NewStatus(framework.UnschedulableAndUnresolvable,
    				"node(s) had untolerated taint {foo: bar}"),
    		},
    		{
    			name: "The pod has a toleration that keys and values match the taint on the node, the effect of toleration is empty, " +
    				"and the effect of taint is NoSchedule. Pod can be scheduled onto the node",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/phases/markcontrolplane/markcontrolplane.go

    		markControlPlaneNode(n, taints)
    	})
    }
    
    func taintExists(taint v1.Taint, taints []v1.Taint) bool {
    	for _, t := range taints {
    		if t == taint {
    			return true
    		}
    	}
    
    	return false
    }
    
    func markControlPlaneNode(n *v1.Node, taints []v1.Taint) {
    	for _, label := range labelsToAdd {
    		n.ObjectMeta.Labels[label] = ""
    	}
    
    	for _, nt := range n.Spec.Taints {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 13 15:45:54 UTC 2022
    - 2K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/phases/markcontrolplane/markcontrolplane_test.go

    			},
    			existingTaints: []v1.Taint{kubeadmconstants.ControlPlaneTaint},
    			newTaints:      []v1.Taint{kubeadmconstants.ControlPlaneTaint},
    			expectedPatch:  `{}`,
    		},
    		{
    			name: "has taint and no new taints wanted",
    			existingLabels: []string{
    				kubeadmconstants.LabelNodeRoleControlPlane,
    				kubeadmconstants.LabelExcludeFromExternalLB,
    			},
    			existingTaints: []v1.Taint{
    				{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 25 14:22:20 UTC 2022
    - 5K bytes
    - Viewed (0)
  9. pkg/controller/tainteviction/taint_eviction_test.go

    	go controller.Run(ctx)
    
    	// no taint
    	nodeIndexer.Add(untaintedNode)
    	controller.handleNodeUpdate(ctx, nodeUpdateItem{"node1"})
    	// verify pod is not queued for deletion
    	if controller.taintEvictionQueue.GetWorkerUnsafe(podNamespacedName.String()) != nil {
    		t.Fatalf("pod queued for deletion with no taints")
    	}
    
    	// no taint -> infinitely tolerated taint
    	nodeIndexer.Update(singleTaintedNode)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 31.3K bytes
    - Viewed (0)
  10. pkg/controller/controller_utils_test.go

    		nodeName       string
    		taintsToRemove []*v1.Taint
    		expectedTaints []v1.Taint
    		requestCount   int
    	}{
    		{
    			name: "remove one taint from node",
    			nodeHandler: &testutil.FakeNodeHandler{
    				Existing: []*v1.Node{
    					{
    						ObjectMeta: metav1.ObjectMeta{
    							Name: "node1",
    						},
    						Spec: v1.NodeSpec{
    							Taints: []v1.Taint{
    								{Key: "key1", Value: "value1", Effect: "NoSchedule"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 39.4K bytes
    - Viewed (0)
Back to top