Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for CheckIfTaintsAlreadyExists (0.34 sec)

  1. pkg/util/taints/taints.go

    			taints = append(taints, newTaint)
    		}
    	}
    	return taints, taintsToRemove, nil
    }
    
    // CheckIfTaintsAlreadyExists checks if the node already has taints that we want to add and returns a string with taint keys.
    func CheckIfTaintsAlreadyExists(oldTaints []v1.Taint, taints []v1.Taint) string {
    	var existingTaintList = make([]string, 0)
    	for _, taint := range taints {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 09:23:35 UTC 2022
    - 8.4K bytes
    - Viewed (0)
  2. pkg/util/taints/taints_test.go

    				},
    				{
    					Key:    "foo_3",
    					Effect: v1.TaintEffectNoSchedule,
    				},
    			},
    			expectedResult: "foo_2,foo_3",
    		},
    	}
    
    	for _, c := range cases {
    		result := CheckIfTaintsAlreadyExists(oldTaints, c.taintsToCheck)
    		if result != c.expectedResult {
    			t.Errorf("[%s] should return '%s', but got: '%s'", c.name, c.expectedResult, result)
    		}
    	}
    }
    
    func TestParseTaints(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 09:23:35 UTC 2022
    - 22.6K bytes
    - Viewed (0)
Back to top