Skip to content

Commit

Permalink
Merge pull request #8035 from ykakarap/clusterct-rollback-valid-resou…
Browse files Browse the repository at this point in the history
…rces

🌱 remove KCP as a valid resource type for rollback
  • Loading branch information
k8s-ci-robot authored Feb 1, 2023
2 parents aa5eacf + 1e2d604 commit eb808f2
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 eb808f2

Please sign in to comment.