- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for TaintSetFilter (0.15 sec)
-
pkg/util/taints/taints.go
if !TaintExists(taintsNew, &taint) { t := taint taintsToRemove = append(taintsToRemove, &t) } } return } // TaintSetFilter filters from the taint slice according to the passed fn function to get the filtered taint slice. func TaintSetFilter(taints []v1.Taint, fn func(*v1.Taint) bool) []v1.Taint { res := []v1.Taint{} for _, taint := range taints { if fn(&taint) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 16 09:23:35 UTC 2022 - 8.4K bytes - Viewed (0) -
pkg/util/taints/taints_test.go
expectedTaints: []v1.Taint{testTaint1, testTaint2, testTaint3}, }, } for _, tc := range testcases { t.Run(tc.name, func(t *testing.T) { taintsAfterFilter := TaintSetFilter(testTaints, tc.fn) if diff := cmp.Diff(tc.expectedTaints, taintsAfterFilter); diff != "" { t.Errorf("Unexpected postFilterResult (-want, +got):\n%s", diff) } }) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 16 09:23:35 UTC 2022 - 22.6K bytes - Viewed (0) -
pkg/controller/nodelifecycle/node_lifecycle_controller.go
taints = append(taints, v1.Taint{ Key: v1.TaintNodeUnschedulable, Effect: v1.TaintEffectNoSchedule, }) } // Get exist taints of node. nodeTaints := taintutils.TaintSetFilter(node.Spec.Taints, func(t *v1.Taint) bool { // only NoSchedule taints are candidates to be compared with "taints" later if t.Effect != v1.TaintEffectNoSchedule { return false }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 51.6K bytes - Viewed (0)