Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 185 for Taint (0.05 sec)

  1. staging/src/k8s.io/api/core/v1/taint.go

    */
    
    package v1
    
    import "fmt"
    
    // MatchTaint checks if the taint matches taintToMatch. Taints are unique by key:effect,
    // if the two taints have same key:effect, regard as they match.
    func (t *Taint) MatchTaint(taintToMatch *Taint) bool {
    	return t.Key == taintToMatch.Key && t.Effect == taintToMatch.Effect
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 16 13:06:01 UTC 2019
    - 1.3K bytes
    - Viewed (0)
  2. pkg/apis/core/taint.go

    package core
    
    import "fmt"
    
    // MatchTaint checks if the taint matches taintToMatch. Taints are unique by key:effect,
    // if the two taints have same key:effect, regard as they match.
    func (t *Taint) MatchTaint(taintToMatch Taint) bool {
    	return t.Key == taintToMatch.Key && t.Effect == taintToMatch.Effect
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 25 18:06:51 UTC 2019
    - 1.4K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/helper/taint.go

    import v1 "k8s.io/api/core/v1"
    
    // DoNotScheduleTaintsFilterFunc returns the filter function that can
    // filter out the node taints that reject scheduling Pod on a Node.
    func DoNotScheduleTaintsFilterFunc() func(t *v1.Taint) bool {
    	return func(t *v1.Taint) bool {
    		// PodToleratesNodeTaints is only interested in NoSchedule and NoExecute taints.
    		return t.Effect == v1.TaintEffectNoSchedule || t.Effect == v1.TaintEffectNoExecute
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 10 01:04:30 UTC 2022
    - 1K bytes
    - Viewed (0)
  4. releasenotes/notes/drop-taint.yaml

    apiVersion: release-notes/v2
    kind: bug-fix
    area: traffic-management
    releaseNotes:
    - |
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 14 15:12:43 UTC 2023
    - 150 bytes
    - Viewed (0)
  5. 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)
  6. staging/src/k8s.io/api/core/v1/taint_test.go

    		},
    		{
    			taint: &Taint{
    				Key: "foo",
    			},
    			expectedString: "foo",
    		},
    		{
    			taint: &Taint{
    				Key:   "foo",
    				Value: "bar",
    			},
    			expectedString: "foo=bar:",
    		},
    	}
    
    	for i, tc := range testCases {
    		if tc.expectedString != tc.taint.ToString() {
    			t.Errorf("[%v] expected taint %v converted to %s, got %s", i, tc.taint, tc.expectedString, tc.taint.ToString())
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 16 13:06:01 UTC 2019
    - 2.9K bytes
    - Viewed (0)
  7. 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)
  8. pkg/apis/core/taint_test.go

    		},
    		{
    			taint: &Taint{
    				Key: "foo",
    			},
    			expectedString: "foo",
    		},
    		{
    			taint: &Taint{
    				Key:   "foo",
    				Value: "bar",
    			},
    			expectedString: "foo=bar:",
    		},
    	}
    
    	for i, tc := range testCases {
    		if tc.expectedString != tc.taint.ToString() {
    			t.Errorf("[%v] expected taint %v converted to %s, got %s", i, tc.taint, tc.expectedString, tc.taint.ToString())
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 16 13:06:01 UTC 2019
    - 2.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/api/core/v1/toleration_test.go

    		description     string
    		toleration      Toleration
    		taint           Taint
    		expectTolerated bool
    	}{
    		{
    			description: "toleration and taint have the same key and effect, and operator is Exists, and taint has no value, expect tolerated",
    			toleration: Toleration{
    				Key:      "foo",
    				Operator: TolerationOpExists,
    				Effect:   TaintEffectNoSchedule,
    			},
    			taint: Taint{
    				Key:    "foo",
    				Effect: TaintEffectNoSchedule,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 22 17:21:42 UTC 2017
    - 3.4K bytes
    - Viewed (0)
  10. 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)
Back to top