Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

add wrapper and update packaging for use by krew#33

Merged
suskin merged 1 commit intocrossplane:masterfrom
displague:krew-index
Feb 18, 2020
Merged

add wrapper and update packaging for use by krew#33
suskin merged 1 commit intocrossplane:masterfrom
displague:krew-index

Conversation

@displague
Copy link
Member

@displague displague commented Jan 2, 2020

Closes #32 by adding LICENSE to the goreleaser tarball and adding a wrapper script for krew to use as a single point of entry for the Crossplane CLI plugins.

The (expected) krew-index manifest yaml:
https://gist.github.com/displague/444bb96b0419a036f51bf40098538a65

The plugin can be installed/tested from this branch by first removing any already installed cropssplane-cli utilities from the path and then running:

tar czvf /tmp/crossplane-krew-archive.tgz .
shasum -256 /tmp/crossplane-krew-archive.tgz 
# create /tmp/crossplane-krew-manifest from the gist above, update the sha256 from above
kubectl krew install --manifest=/tmp/crossplane-krew-manifest --archive=/tmp/crossplane-krew-archive.tgz

@displague displague changed the title [WIP] add wrapper and update packaging for use by krew add wrapper and update packaging for use by krew Jan 9, 2020
@suskin suskin self-requested a review January 10, 2020 23:05
@suskin suskin self-assigned this Jan 10, 2020
Copy link
Member

@suskin suskin left a comment

Choose a reason for hiding this comment

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

Cool! 🦑

What testing has been done?

usage
exit 1
if [[ $# -gt 0 ]] ; then
echo "Unknown command: $1" >&2
Copy link
Member

Choose a reason for hiding this comment

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

Niceee 🦑

set -e
BASEDIR=$(dirname $(realpath "$0"))

PATH="${BASEDIR}:${PATH}" exec $BASEDIR/kubectl-crossplane "$@"
Copy link
Member

Choose a reason for hiding this comment

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

Hmm I'm not super familiar with the krew idioms yet, but it seems like calling this would always result in Unknown command. What am I missing?

Copy link
Member Author

Choose a reason for hiding this comment

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

The reasoning behind this is here, #32 (comment), based on a conversation with the Krew authors.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated this based on a review session with @suskin

@suskin suskin assigned displague and unassigned suskin Jan 17, 2020
Signed-off-by: Marques Johansson <marques@upbound.io>
Copy link
Member

@suskin suskin left a comment

Choose a reason for hiding this comment

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

Looks good to me! I paired with @displague to watch the testing of the most recent changes 🦑🦑🦑 :shipit:

@suskin suskin merged commit 5e2792d into crossplane:master Feb 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add crossplane-cli to krew-index

2 participants