Skip to content

Add crossplane-cli feature#208

Open
joebowbeer wants to merge 3 commits intodevcontainers-extra:mainfrom
joebowbeer:crossplane-cli
Open

Add crossplane-cli feature#208
joebowbeer wants to merge 3 commits intodevcontainers-extra:mainfrom
joebowbeer:crossplane-cli

Conversation

@joebowbeer
Copy link
Copy Markdown

@joebowbeer joebowbeer commented Apr 4, 2026

Adapted from https://github.com/joebowbeer/devcontainers-features/tree/main/test/crossplane

I'm hoping to find a home for this here.

The tests are modified to work around a couple of hurdles:

  1. crossplane version prints the version of both the client (CLI) and the server, which runs in a k8s operator. This emits a non-zero exit code if there's no cluster. Consequently, the tests ignore the exit code and match on a client version string. To test that some version is installed, the tests run crossplane -h.
  2. Crossplane releases are pruned fairly often, so there is no test that matches on an exact version even though version strings like x.y.z are supported.

Will the README be generated automatically or does it need to be added manually? #207

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
Copy link
Copy Markdown
Member

@koralowiec koralowiec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heyo, thanks for the PR, few comments in the code and below:

Crossplane releases are pruned fairly often

What does it mean? I haven't used the tool, so I'm not sure what's the release behavior for it


You can ignore this error in version checker workflow:

Version bump required for src/claude-code. Current version: 1.0.0, Base version: 2.0.0

Or simply rebase to main which should solve the false negative

export XP_VERSION="${VERSION:-"current"}"
export XP_CHANNEL="${CHANNEL:-"stable"}"

curl -sSL "https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh" | sh
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if this script changes frequently? I think I would prefer to save it alongside the rest of the feature's files (maybe as bootstrap.sh or upstream-install.sh), and then execute it from there.
I'm not a fan of downloading a script from somewhere and piping it to shell

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: That's what I did today for Claude Code feature here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if this script changes frequently? I think I would prefer to save it alongside the rest of the feature's files (maybe as bootstrap.sh or upstream-install.sh), and then execute it from there. I'm not a fan of downloading a script from somewhere and piping it to shell

It changes a couple times a year, usually in a minor way.

https://github.com/crossplane/crossplane/commits/main/install.sh

@koralowiec
Copy link
Copy Markdown
Member

Will the README be generated automatically or does it need to be added manually?

Well, it's kinda automated... There's a devcontainer CLI command that can be run to generate the README, but it generates the files for all features. TBH I'm not a fan of it, but I don't have a better way of generating/writing them of now, so it's kinda in limbo

@joebowbeer
Copy link
Copy Markdown
Author

Heyo, thanks for the PR, few comments in the code and below:

Crossplane releases are pruned fairly often

What does it mean? I haven't used the tool, so I'm not sure what's the release behavior for it

They maintain three release channels and some well-known tags, but the exact x.y.z versions change frequently and old x.y.z versions will go away:

url="https://releases.crossplane.io/${XP_CHANNEL}/${XP_VERSION}/${url_dir}/${OS_ARCH}/${url_file}"

Most often, users will install the current version from their chosen channel (e.g., stable)

joebowbeer and others added 2 commits April 11, 2026 10:08
Co-authored-by: Arek Kalandyk <36413794+koralowiec@users.noreply.github.com>
Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants