diff --git a/Dockerfile b/Dockerfile index 20eb3140..2477ac91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ COPY . . RUN yum -y install git openssh jq which curl \ && yum clean all && rm -rf /var/cache/yum \ - && curl -sLO https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl \ + && curl -sLO https://dl.k8s.io/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl \ && chmod 755 ./kubectl /viya4-iac-azure/docker-entrypoint.sh \ && mv ./kubectl /usr/local/bin/kubectl \ && chmod g=u -R /etc/passwd /etc/group /viya4-iac-azure \ diff --git a/container-structure-test.yaml b/container-structure-test.yaml index 35510188..eb11800a 100644 --- a/container-structure-test.yaml +++ b/container-structure-test.yaml @@ -12,6 +12,10 @@ fileExistenceTests: path: '/usr/bin/az' shouldExist: true permissions: '-rwxr-xr-x' + - name: 'kubectl' + path: '/usr/local/bin/kubectl' + shouldExist: true + permissions: '-rwxr-xr-x' commandTests: - name: "terraform version" @@ -22,7 +26,6 @@ commandTests: command: "python3" args: ["--version"] expectedOutput: ["Python 3.*"] - - name: "az-cli version" command: "bash" args: @@ -30,6 +33,13 @@ commandTests: - | az version -o tsv expectedOutput: ["2.64.0\t2.64.0\t1.1.0"] + - name: "kubectl version" + command: "bash" + args: + - -c + - | + kubectl version --client + expectedOutput: ["Client Version:\tv1.30.6\nKustomize Version:\tv5.0.4*"] metadataTest: workdir: "/viya4-iac-azure"