Skip to content

Commit

Permalink
add kubectl plugin syntax (#399)
Browse files Browse the repository at this point in the history
Co-authored-by: mvallillo <mvallillo@microsoft.com>
  • Loading branch information
vachillo and mvallillo authored Sep 20, 2022
1 parent 4560717 commit 6b0d4e0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
installfilesdev


.uptodate
.uptodate

# allocator compiled plugin
kubectl-gameserver-allocate
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,6 @@ clean:
docker rmi $(IMAGE_NAMES) >/dev/null 2>&1 || true
rm -rf -- $(UPTODATE_FILES) $(EXES) .cache dist
go clean ./...

kubectl-allocator-plugin:
./cmd/allocator/build-plugin.sh
6 changes: 6 additions & 0 deletions cmd/allocator/build-plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
CURR_PATH="$(dirname "$BASH_SOURCE")"
go build -o $CURR_PATH $CURR_PATH/main.go
mv $CURR_PATH/command-line-arguments $CURR_PATH/kubectl-gameserver-allocate
export PATH=$PATH:"$(cd $CURR_PATH; pwd)"
kubectl plugin list

0 comments on commit 6b0d4e0

Please sign in to comment.