install kustomize (#1415)

This commit is contained in:
Dhananajaya M. Senanayake
2020-08-17 14:06:21 +05:30
committed by GitHub
parent 5cf25b5baa
commit 6b9c25bb72

View File

@@ -1,7 +1,7 @@
#!/bin/bash
################################################################################
## File: kubernetes-tools.sh
## Desc: Installs kubectl, helm
## Desc: Installs kubectl, helm, kustomize
################################################################################
# Source the helpers for use with the script
@@ -23,6 +23,8 @@ curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bas
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
# Install kustomize
sudo snap install kustomize
# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
@@ -43,9 +45,17 @@ if ! command -v minikube; then
exit 1
fi
echo "Testing to make sure that kustomize was installed"
if ! command -v kustomize; then
echo "kustomize was not installed"
exit 1
fi
# Document what was added to the image
echo "Lastly, documenting what we added to the metadata file"
DocumentInstalledItem "kubectl ($(kubectl version --client --short |& head -n 1))"
DocumentInstalledItem "helm ($(helm version --short |& head -n 1))"
# minikube version output already has word minikube in it. example minikube version: v1.9.2
DocumentInstalledItem "$(minikube version --short)"
# kustomize version output has "{} in it". example {kustomize/v3.8.1 2020-07-16T00:58:46Z }
DocumentInstalledItem "kustomize ($(kustomize version --short))"