From 078cdb245dff42bde5a30f5dd700ed92c78012a9 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Fri, 28 May 2021 13:59:35 +0200 Subject: [PATCH 1/3] [meta] add helm 3.6.0 support This commit bump the Helm version used in helm-charts tests to 3.6.0. https://github.com/helm/helm/releases/tag/v3.6.0 --- README.md | 2 +- helpers/helm-tester/Dockerfile | 2 +- helpers/terraform/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f385b26b2..50034b296 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ exact versions are defined under `KUBERNETES_VERSIONS` in ### Helm versions While we are checking backward compatibility, the charts are only tested with -Helm version mentioned in [helm-tester Dockerfile][] (currently 3.5.3). +Helm version mentioned in [helm-tester Dockerfile][] (currently 3.6.0). ## ECK diff --git a/helpers/helm-tester/Dockerfile b/helpers/helm-tester/Dockerfile index 0ac396abd..1c4a3b48a 100644 --- a/helpers/helm-tester/Dockerfile +++ b/helpers/helm-tester/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.7 -ENV HELM_VERSION=3.5.3 +ENV HELM_VERSION=3.6.0 RUN wget --no-verbose https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ tar xfv helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ diff --git a/helpers/terraform/Dockerfile b/helpers/terraform/Dockerfile index 1a652c103..ca2f8d691 100644 --- a/helpers/terraform/Dockerfile +++ b/helpers/terraform/Dockerfile @@ -3,7 +3,7 @@ FROM centos:7 ENV VAULT_VERSION 0.9.3 ENV TERRAFORM_VERSION=0.11.7 ENV KUBECTL_VERSION=1.17.17 -ENV HELM_VERSION=3.5.3 +ENV HELM_VERSION=3.6.0 ENV DOCKER_VERSION=18.09.7 ENV JQ_VERSION=1.6 From 1e001879f15967bef9dc29aa27b6deb2593a68cb Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Wed, 7 Jul 2021 11:07:37 +0200 Subject: [PATCH 2/3] [meta] bump to helm 3.6.2 --- README.md | 2 +- helpers/helm-tester/Dockerfile | 2 +- helpers/terraform/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 50034b296..9ce61e930 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ exact versions are defined under `KUBERNETES_VERSIONS` in ### Helm versions While we are checking backward compatibility, the charts are only tested with -Helm version mentioned in [helm-tester Dockerfile][] (currently 3.6.0). +Helm version mentioned in [helm-tester Dockerfile][] (currently 3.6.2). ## ECK diff --git a/helpers/helm-tester/Dockerfile b/helpers/helm-tester/Dockerfile index 1c4a3b48a..747565754 100644 --- a/helpers/helm-tester/Dockerfile +++ b/helpers/helm-tester/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.7 -ENV HELM_VERSION=3.6.0 +ENV HELM_VERSION=3.6.2 RUN wget --no-verbose https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ tar xfv helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ diff --git a/helpers/terraform/Dockerfile b/helpers/terraform/Dockerfile index ca2f8d691..2ba54f729 100644 --- a/helpers/terraform/Dockerfile +++ b/helpers/terraform/Dockerfile @@ -3,7 +3,7 @@ FROM centos:7 ENV VAULT_VERSION 0.9.3 ENV TERRAFORM_VERSION=0.11.7 ENV KUBECTL_VERSION=1.17.17 -ENV HELM_VERSION=3.6.0 +ENV HELM_VERSION=3.6.2 ENV DOCKER_VERSION=18.09.7 ENV JQ_VERSION=1.6 From 24d7989ee4f1fcabde3e598670b3a084e3385e79 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Wed, 7 Jul 2021 13:23:34 +0200 Subject: [PATCH 3/3] [meta] add retry to goss test --- helpers/examples.mk | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/helpers/examples.mk b/helpers/examples.mk index 130756f4e..da6b89dc9 100644 --- a/helpers/examples.mk +++ b/helpers/examples.mk @@ -10,7 +10,15 @@ help: ## Display this help .PHONY: goss goss: ## Run goss tests - GOSS_CONTAINER=$$(kubectl get --no-headers=true pods -l $(GOSS_SELECTOR) -o custom-columns=:metadata.name --field-selector=status.phase=Running --sort-by=.metadata.creationTimestamp | tail -1 ) && \ - echo Testing with pod: $$GOSS_CONTAINER && \ - kubectl cp test/$(GOSS_FILE) $$GOSS_CONTAINER:/tmp/$(GOSS_FILE) && \ - kubectl exec $$GOSS_CONTAINER -- sh -c "cd /tmp/ && curl -s -L https://github.com/aelsabbahy/goss/releases/download/$(GOSS_VERSION)/goss-linux-amd64 -o goss && chmod +rx ./goss && ./goss --gossfile $(GOSS_FILE) validate --retry-timeout 300s --sleep 5s --color --format documentation" + for i in $$(seq 1 5); do \ + if [ -z "$$GOSS_CONTAINER" ]; then \ + sleep 5; \ + echo "Retrieving pod ($$i/5)"; \ + GOSS_CONTAINER=$$(kubectl get --no-headers=true pods -l "$(GOSS_SELECTOR)" -o custom-columns=:metadata.name --field-selector=status.phase=Running --sort-by=.metadata.creationTimestamp | tail -1 ); \ + else \ + echo "Testing with pod: $$GOSS_CONTAINER" && \ + kubectl cp "test/$(GOSS_FILE)" "$$GOSS_CONTAINER:/tmp/$(GOSS_FILE)" && \ + kubectl exec "$$GOSS_CONTAINER" -- sh -c "cd /tmp/ && curl -s -L \"https://github.com/aelsabbahy/goss/releases/download/$(GOSS_VERSION)/goss-linux-amd64\" -o goss && chmod +rx ./goss && ./goss --gossfile \"$(GOSS_FILE)\" validate --retry-timeout 300s --sleep 5s --color --format documentation"; \ + break; \ + fi; \ + done