Add flags to specify the desired Crossplane version and upgrade channel in the
up ctp create command. Return an error if a version is specified with a
release channel other than None, since the server will accept a spec with a
version specified but ignore it in favor of the release channel's current
version.
For now, we don't have a programmatic way to fetch the valid release channels so
we hard-code the options. Similarly, we don't have an API to fetch supported
versions so we can't list them for the user in the CLI.
Description of your changes
Add flags to specify the desired Crossplane version and upgrade channel in the
up ctp create
command. Return an error if a version is specified with a release channel other thanNone
, since the server will accept a spec with a version specified but ignore it in favor of the release channel's current version.For now, we don't have a programmatic way to fetch the valid release channels so we hard-code the options. Similarly, we don't have an API to fetch supported versions so we can't list them for the user in the CLI.
Fixes #541
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR, as appropriate.How has this code been tested
Manual testing of the following cases:
up ctp create
without the new arguments works as before.up ctp create --version=1.14.8-up.1 --channel=None
is successful and the ctp has the right version.up ctp create --version=1.14.8-up.1
throws an error since the default release channel isStable
.up ctp create --channel=Rapid
is successful and the ctp has the right release channel.