Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ToleratesTaint (0.14 sec)

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

    	return t.Key == tolerationToMatch.Key &&
    		t.Effect == tolerationToMatch.Effect &&
    		t.Operator == tolerationToMatch.Operator &&
    		t.Value == tolerationToMatch.Value
    }
    
    // ToleratesTaint checks if the toleration tolerates the taint.
    // The matching follows the rules below:
    //
    //  1. Empty toleration.effect means to match all taint effects,
    //     otherwise taint effect must equal to toleration.effect.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Dec 18 04:27:38 UTC 2022
    - 2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/api/core/v1/toleration_test.go

    			taint: Taint{
    				Key:    "foo",
    				Value:  "bar",
    				Effect: TaintEffectNoExecute,
    			},
    			expectTolerated: false,
    		},
    	}
    	for _, tc := range testCases {
    		if tolerated := tc.toleration.ToleratesTaint(&tc.taint); tc.expectTolerated != tolerated {
    			t.Errorf("[%s] expect %v, got %v: toleration %+v, taint %s", tc.description, tc.expectTolerated, tolerated, tc.toleration, tc.taint.ToString())
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 22 17:21:42 UTC 2017
    - 3.4K bytes
    - Viewed (0)
  3. pkg/apis/core/v1/helper/helpers.go

    		return false, []v1.Toleration{}
    	}
    	result := []v1.Toleration{}
    	for i := range taints {
    		tolerated := false
    		for j := range tolerations {
    			if tolerations[j].ToleratesTaint(&taints[i]) {
    				result = append(result, tolerations[j])
    				tolerated = true
    				break
    			}
    		}
    		if !tolerated {
    			return false, []v1.Toleration{}
    		}
    	}
    	return true, result
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 23:03:54 UTC 2024
    - 11.4K bytes
    - Viewed (0)
Back to top