-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new
kubectl_version
param (#115)
* add new `kubectl_version` param - enables running the plugin using a non-default `kubectl` executable - updates image `ENTRYPOINT` to support setting of `EXTRA_KUBECTL_VERSIONS` environment variable used by plugin to validate against `kubectl_version` depends on #114 * update DOCS * update validation implementation, docs; add new option to make run target * rename entrypoint to set-env-versions
- Loading branch information
Showing
8 changed files
with
168 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
# location to search for extra kubectl version | ||
# defaults to default used by `gcloud components install kubectl` | ||
gcloud_sdk_bin_dir=${1:-'/google-cloud-sdk/bin'} | ||
|
||
# filename glob for extra kubectl versions | ||
# defaults to default used by `gcloud components install kubectl` | ||
extra_kubectl_glob=${2:-'kubectl.*'} | ||
|
||
find ${gcloud_sdk_bin_dir} -type f -name ${extra_kubectl_glob} -exec basename {} \; \ | ||
| cut -d '.' -f 2,3 \ | ||
| sort -g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
export EXTRA_KUBECTL_VERSIONS=$(echo $(list-extra-kubectl-versions)) | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters