Skip to content

Commit

Permalink
feat: Support for KUBECTL_VERSION for aws flavour
Browse files Browse the repository at this point in the history
  • Loading branch information
dploeger committed May 12, 2022
1 parent 84034b8 commit d56838d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ as [this](https://github.com/kubernetes/kubernetes/issues/37922)
[sometimes](https://github.com/kubernetes/kubernetes/issues/60134)
seems to fail.

* (simple flavour) Environment KUBECTL_VERSION: The version of kubectl to install
* (simple and aws flavour) Environment KUBECTL_VERSION: The version of kubectl to install

* (tanzu flavour)
* Environment TANZU_HOST: The tanzu host to download the kubectl vsphere plugin from and authenticate against
Expand Down
2 changes: 1 addition & 1 deletion feature/kubernetes/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ configuration:
[sometimes](https://github.com/kubernetes/kubernetes/issues/60134)
seems to fail.
- |
(simple flavour) Environment KUBECTL_VERSION: The version of kubectl to install
(simple and aws flavour) Environment KUBECTL_VERSION: The version of kubectl to install
- |
(tanzu flavour)
* Environment TANZU_HOST: The tanzu host to download the kubectl vsphere plugin from and authenticate against
Expand Down
8 changes: 7 additions & 1 deletion feature/kubernetes/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ EOF

execHandle "Configuring package repository for kubectl" sudo mv "${TEMPFILE}" /etc/yum.repos.d/kubernetes.repo

execHandle "Installing kubectl..." sudo yum install -y kubectl
KUBECTL_PACKAGE="kubectl"
if [[ "X${KUBECTL_VERSION}X" -ne "XX" ]]
then
KUBECTL_PACKAGE="${KUBECTL_PACKAGE}-${KUBECTL_VERSION}"
fi

execHandle "Installing kubectl..." sudo yum install -y "$KUBECTL_PACKAGE"
elif [ "X$(cat /home/cloudcontrol/flavour)X" == "XsimpleX" ]
then
TEMPDIR=$(mktemp -d)
Expand Down

0 comments on commit d56838d

Please sign in to comment.