MCPcopy Create free account
hub / github.com/aws/aws-node-termination-handler / getTaintEffect

Function getTaintEffect

pkg/node/node.go:770–782  ·  view source on GitHub ↗
(effect string)

Source from the content-addressed store, hash-verified

768}
769
770func getTaintEffect(effect string) corev1.TaintEffect {
771 switch effect {
772 case "PreferNoSchedule":
773 return corev1.TaintEffectPreferNoSchedule
774 case "NoExecute":
775 return corev1.TaintEffectNoExecute
776 default:
777 log.Warn().Msgf("Unknown taint effect: %s", effect)
778 fallthrough
779 case "NoSchedule":
780 return corev1.TaintEffectNoSchedule
781 }
782}
783
784func addTaint(node *corev1.Node, nth Node, taintKey string, taintValue string, effectType string) error {
785 effect := getTaintEffect(effectType)

Callers 1

addTaintFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected