func exists()

in webhooks/alloydb-mutating-wh/handlers/pod_tolerations_handler.go [176:185]


func exists(add corev1.Toleration, existing []corev1.Toleration) bool {

	for _, e := range existing {
		if add.Key == e.Key { // Only check for the key & and if there's a match, just don't overwrite it, regardless of the operator or effect
			return true
		}
	}
	return false

}