Skip to content

Commit

Permalink
remove KCP as a valid resource type for rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuvaraj Kakaraparthi committed Jan 31, 2023
1 parent 2c89700 commit 1e2d604
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmd/clusterctl/client/alpha/rollout.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ var validResourceTypes = []string{
KubeadmControlPlane,
}

var validRollbackResourceTypes = []string{
MachineDeployment,
}

// Rollout defines the behavior of a rollout implementation.
type Rollout interface {
ObjectRestarter(cluster.Proxy, corev1.ObjectReference) error
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/client/alpha/rollout_rollbacker.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (r *rollout) ObjectRollbacker(proxy cluster.Proxy, ref corev1.ObjectReferen
return err
}
default:
return errors.Errorf("invalid resource type %q, valid values are %v", ref.Kind, validResourceTypes)
return errors.Errorf("invalid resource type %q, valid values are %v", ref.Kind, validRollbackResourceTypes)
}
return nil
}
Expand Down

0 comments on commit 1e2d604

Please sign in to comment.