File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7575
7676 - name : Configure Kustomize
7777 run : |
78- curl -s "https://raw.githubusercontent.com/\
79- kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
80- echo "Kustomize Version"
78+ chmod +x hack/install_kustomize.sh
79+ ./hack/install_kustomize.sh /usr/local/bin/
8180 kustomize version
8281
8382
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Downloads the most recently released kustomize binary
4+ # to your current working directory.
5+ #
6+ # Fails if the file already exists.
7+
8+ where=$1
9+ if [ -f $where /kustomize ]; then
10+ echo " A file named kustomize already exists (remove it first)."
11+ exit 1
12+ fi
13+
14+ tmpDir=` mktemp -d`
15+ if [[ ! " $tmpDir " || ! -d " $tmpDir " ]]; then
16+ echo " Could not create temp dir."
17+ exit 1
18+ fi
19+
20+ function cleanup {
21+ rm -rf " $tmpDir "
22+ }
23+
24+ trap cleanup EXIT
25+
26+ pushd $tmpDir >& /dev/null
27+
28+ opsys=windows
29+ if [[ " $OSTYPE " == linux* ]]; then
30+ opsys=linux
31+ elif [[ " $OSTYPE " == darwin* ]]; then
32+ opsys=darwin
33+ fi
34+
35+ echo " Downloading kustomize..."
36+
37+ curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases | \
38+ grep browser_download | \
39+ grep $opsys | \
40+ cut -d ' "' -f 4 | \
41+ grep /kustomize/v | \
42+ sort | tail -n 1 | \
43+ xargs curl -s -O -L
44+
45+ tar xzf ./kustomize_v* _${opsys} _amd64.tar.gz
46+
47+ sudo cp ./kustomize $where
48+
49+ popd >& /dev/null
50+ echo kustomize installed to $where
You can’t perform that action at this time.
0 commit comments