From a42baf2cc5609abfaae76412e16dfb6d3e0c366d Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Thu, 8 Jul 2021 09:30:41 +0200 Subject: [PATCH] [meta] add helm 3.6.2 support (#1232) * [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 * [meta] bump to helm 3.6.2 * [meta] add retry to goss test --- README.md | 2 +- helpers/examples.mk | 16 ++++++++++++---- helpers/helm-tester/Dockerfile | 2 +- helpers/terraform/Dockerfile | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c4b640458..b8cb2f7cb 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,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.2). ## ECK diff --git a/helpers/examples.mk b/helpers/examples.mk index bcbb11ef7..e7e1dfeff 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 diff --git a/helpers/helm-tester/Dockerfile b/helpers/helm-tester/Dockerfile index 0ac396abd..747565754 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.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 f6e0e0e3d..43ed630b1 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.19.9 -ENV HELM_VERSION=3.5.3 +ENV HELM_VERSION=3.6.2 ENV DOCKER_VERSION=18.09.7 ENV JQ_VERSION=1.6