From 2e33af7bb54c053f27f85e34ec40198e45e616ac Mon Sep 17 00:00:00 2001
From: Varac <varac@varac.net>
Date: Wed, 16 Jun 2021 23:17:45 +0200
Subject: [PATCH] Install kubectl

---
 .gitlab-ci.yml | 4 ----
 Dockerfile     | 8 +++++---
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4161ed386..df545790f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -309,10 +309,6 @@ setup-openappstack:
     # export IP_ADDRESS and FQDN vars
     - source clusters/${CI_COMMIT_REF_SLUG}/.cluster.env
     - sed "s/1.2.3.4/$IP_ADDRESS/; s/example.org/$FQDN/; s/acme_staging=false/acme_staging=true/; s/acme-staging/acme/" install/.env.example >> clusters/${CI_COMMIT_REF_SLUG}/.cluster.env
-    - cat clusters/${CI_COMMIT_REF_SLUG}/.cluster.env
-    - pwd
-    - ls -la .
-    - ls -la ./install
     - source clusters/${CI_COMMIT_REF_SLUG}/.cluster.env
     - bash ./install/install-openappstack.sh
     # TODO: Should also be removed or made up-to-date
diff --git a/Dockerfile b/Dockerfile
index 328ae04cf..defa9edc6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,8 +7,9 @@ LABEL vendor1="Greenhost"
 
 # Download yq v4 from github until it's packaged in alpine > 3.13
 ADD https://github.com/mikefarah/yq/releases/download/v4.7.0/yq_linux_amd64 /usr/local/bin/yq
-ADD https://github.com/fluxcd/flux2/releases/download/v0.15.0/flux_0.15.0_linux_amd64.tar.gz /tmp
-RUN tar -xzf /tmp/flux*.tar.gz && mv ./flux /usr/local/bin
+ADD https://github.com/fluxcd/flux2/releases/download/v0.15.0/flux_0.15.0_linux_amd64.tar.gz /tmp/
+# Download kubectl until it's packaged in alpine > 3.14
+ADD https://dl.k8s.io/release/v1.21.0/bin/linux/amd64/kubectl /usr/local/bin/
 COPY ./test/pytest/le-staging-bundle.pem /usr/local/share/ca-certificates/le-staging-bundle.pem
 COPY ./requirements.txt /requirements.txt
 RUN \
@@ -34,4 +35,5 @@ RUN \
   chmod a+x /usr/local/bin/* && \
   update-ca-certificates && \
   pip install --no-cache-dir -r /requirements.txt && \
-  ln -s /usr/bin/python3 /usr/bin/python
+  ln -s /usr/bin/python3 /usr/bin/python && \
+  tar -xzf /tmp/flux*.tar.gz && mv ./flux /usr/local/bin
-- 
GitLab