Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kubectl installation #799

Merged
8 changes: 6 additions & 2 deletions images/linux/scripts/installers/1604/basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ apt-fast install -y --no-install-recommends \
zip \
zstd

# Electron / VSCode / GitHub Desktop prereqs
# Electron / VSCode / GitHub Desktop / kubectl prereqs
apt-fast install -y --no-install-recommends \
libxkbfile-dev \
pkg-config \
Expand All @@ -57,7 +57,9 @@ apt-fast install -y --no-install-recommends \
rpm \
xz-utils \
xorriso \
zsync
zsync \
apt-transport-https \
vsafonkin marked this conversation as resolved.
Show resolved Hide resolved
gnupg2

# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
Expand Down Expand Up @@ -99,3 +101,5 @@ DocumentInstalledItemIndent "upx"
DocumentInstalledItemIndent "wget"
DocumentInstalledItemIndent "zip"
DocumentInstalledItemIndent "zstd"
DocumentInstalledItemIndent "apt-transport-https"
DocumentInstalledItemIndent "gnupg2"
40 changes: 0 additions & 40 deletions images/linux/scripts/installers/1604/kubernetes-tools.sh

This file was deleted.

8 changes: 8 additions & 0 deletions images/linux/scripts/installers/1804/basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ apt-get install -y --no-install-recommends curl
echo "Install parallel"
apt-get install -y --no-install-recommends parallel

echo "Install apt-transport-https"
apt-get install -y --no-install-recommends apt-transport-https
vsafonkin marked this conversation as resolved.
Show resolved Hide resolved

echo "Install gnupg2"
apt-get install -y --no-install-recommends gnupg2

# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
for cmd in curl file ftp jq netcat ssh parallel rsync shellcheck sudo telnet time unzip wget zip; do
Expand Down Expand Up @@ -168,3 +174,5 @@ DocumentInstalledItemIndent "upx"
DocumentInstalledItemIndent "wget"
DocumentInstalledItemIndent "zip"
DocumentInstalledItemIndent "zstd"
DocumentInstalledItemIndent "apt-transport-https"
DocumentInstalledItemIndent "gnupg2"
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ source $HELPER_SCRIPTS/document.sh
source $HELPER_SCRIPTS/apt.sh

## Install kubectl
apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
touch /etc/apt/sources.list.d/kubernetes.list

# Based on https://kubernetes.io/docs/tasks/tools/install-kubectl/, package is still called xenial
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list
# Based on https://kubernetes.io/docs/tasks/tools/install-kubectl/, package is xenial for both OS versions.
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list
apt-get update
apt-get install -y kubectl

Expand All @@ -38,5 +37,5 @@ helm init --client-only

# Document what was added to the image
echo "Lastly, documenting what we added to the metadata file"
DocumentInstalledItem "kubectl ($(kubectl version --short |& head -n 1))"
DocumentInstalledItem "kubectl ($(kubectl version --client --short |& head -n 1))"
DocumentInstalledItem "helm ($(helm version --short |& head -n 1))"
2 changes: 1 addition & 1 deletion images/linux/ubuntu1604.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
"{{template_dir}}/scripts/installers/image-magick.sh",
"{{template_dir}}/scripts/installers/java-tools.sh",
"{{template_dir}}/scripts/installers/kind.sh",
"{{template_dir}}/scripts/installers/1604/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/leiningen.sh",
"{{template_dir}}/scripts/installers/1604/mercurial.sh",
"{{template_dir}}/scripts/installers/miniconda.sh",
Expand Down
2 changes: 1 addition & 1 deletion images/linux/ubuntu1804.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"{{template_dir}}/scripts/installers/image-magick.sh",
"{{template_dir}}/scripts/installers/java-tools.sh",
"{{template_dir}}/scripts/installers/kind.sh",
"{{template_dir}}/scripts/installers/1804/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/leiningen.sh",
"{{template_dir}}/scripts/installers/1804/mercurial.sh",
"{{template_dir}}/scripts/installers/miniconda.sh",
Expand Down