fix:handle error and remove Redundant type conversion

Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
This commit is contained in:
jianfei.zhang
2022-07-15 15:15:23 +08:00
parent f3654386ab
commit 49e7a7b51d
5 changed files with 25 additions and 19 deletions

View File

@@ -275,7 +275,7 @@ func (t RegisterWithTaintsVar) Set(s string) error {
}
var taints []v1.Taint
for _, ct := range corev1Taints {
taints = append(taints, v1.Taint{Key: ct.Key, Value: ct.Value, Effect: v1.TaintEffect(ct.Effect)})
taints = append(taints, v1.Taint{Key: ct.Key, Value: ct.Value, Effect: ct.Effect})
}
*t.Value = taints
return nil