Skip to content

Commit c094eb5

Browse files
Merge pull request #19 from codefresh-io/backout-changes-supporting-v1.13
Revert "Add support for kubernetes 1.13"
2 parents cadc112 + 3cbd3ce commit c094eb5

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ RUN apk add --update bash
1515
#copy all versions of kubectl to switch between them later.
1616
COPY --from=builder kubectl1.15 /usr/local/bin/
1717
COPY --from=builder kubectl1.14 /usr/local/bin/
18-
COPY --from=builder kubectl1.10 /usr/local/bin/
1918
COPY --from=builder kubectl1.10 /usr/local/bin/kubectl
2019
COPY --from=builder kubectl1.6 /usr/local/bin/
2120

22-
RUN chmod +x /usr/local/bin/kubectl /usr/local/bin/kubectl1.6 /usr/local/bin/kubectl1.10 /usr/local/bin/kubectl1.14 /usr/local/bin/kubectl1.15
21+
RUN chmod +x /usr/local/bin/kubectl /usr/local/bin/kubectl1.6 /usr/local/bin/kubectl1.14 /usr/local/bin/kubectl1.15
2322

2423
WORKDIR /
2524

cf-deploy-kubernetes.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,9 @@ fi
6262
#check the cluster version and decide which version of kubectl to use:
6363
SERVER_VERSION=$(kubectl version --short=true --context "${KUBECONTEXT}" | grep -i server | cut -d ':' -f2 | cut -d '.' -f2 | sed 's/[^0-9]*//g')
6464
echo "Server minor version: $SERVER_VERSION"
65-
if (( "$SERVER_VERSION" <= "6" )); then
66-
KUBECTL_MINOR_VERSION=6
67-
elif (( "$SERVER_VERSION" <= "12" )); then
68-
KUBECTL_MINOR_VERSION=10
69-
elif (( "$SERVER_VERSION" <= "14" )); then
70-
KUBECTL_MINOR_VERSION=14
71-
elif (( "$SERVER_VERSION" >= "15" )); then
72-
KUBECTL_MINOR_VERSION=15
73-
fi
74-
cp -f /usr/local/bin/kubectl1.$KUBECTL_MINOR_VERSION /usr/local/bin/kubectl > 2>/dev/null
75-
65+
if (( "$SERVER_VERSION" <= "6" )); then cp -f /usr/local/bin/kubectl1.6 /usr/local/bin/kubectl; fi 2>/dev/null
66+
if (( "$SERVER_VERSION" == "14" )); then cp -f /usr/local/bin/kubectl1.14 /usr/local/bin/kubectl; fi 2>/dev/null
67+
if (( "$SERVER_VERSION" >= "15" )); then cp -f /usr/local/bin/kubectl1.15 /usr/local/bin/kubectl; fi 2>/dev/null
7668
[ ! -f "${deployment_file}" ] && echo "Couldn't find $deployment_file file at $(pwd)" && exit 1;
7769

7870
DEPLOYMENT_FILE=${deployment_file}-$(date '+%y-%m-%d_%H-%M-%S').yml

0 commit comments

Comments
 (0)