diff --git a/pkg/manager/manager.go b/pkg/manager/manager.go index 28ac8a7d..30592cd1 100644 --- a/pkg/manager/manager.go +++ b/pkg/manager/manager.go @@ -397,30 +397,25 @@ func (m *SupportBundleManager) getTaintToleration() []v1.Toleration { } taintToleration = append(taintToleration, *toleration) } - - if len(taintToleration) == 0 { - return []v1.Toleration{{Operator: v1.TolerationOpExists}} - } return taintToleration } func parseToleration(taintToleration string) (*v1.Toleration, error) { - toleration := &v1.Toleration{} - // The schema should be `key=value:effect` or `key:effect` parts := strings.Split(taintToleration, ":") if len(parts) != 2 { return nil, fmt.Errorf("missing key/value and effect pair") } - keyValue := parts[0] - key, value, operator, err := parseTolerationKeyAndValue(keyValue) + key, value, operator, err := parseTolerationKeyAndValue(parts[0]) if err != nil { return nil, err } - toleration.Key = key - toleration.Value = value - toleration.Operator = operator + toleration := &v1.Toleration{ + Key: key, + Value: value, + Operator: operator, + } toleration.Effect, err = parseTaintEffect(parts[1]) if err != nil { return nil, err