From 4edd89e536700f2f2a43f70a601866eb4832a7fc Mon Sep 17 00:00:00 2001 From: Michael Nelson Date: Wed, 7 Dec 2022 07:46:59 +1100 Subject: [PATCH] Finish switching from GKE_BRANCH to GKE_VERSION (from #5730) (#5780) This PR aims to fix the failing full integration pipeline (which we need to pass for release). Also updates Hugo version (based on instructions in the release-process.md. Signed-off-by: Michael Nelson ### Description of the change Recent runs (from the past 6 days) of the [full integration pipeline](https://github.com/vmware-tanzu/kubeapps/actions/workflows/kubeapps-full-integration.yaml) have been failing. Looking for the differences, I could see that: - `chart-museum.sh` was failing to upload our custom apache chart to the chartmuseum instance, because... - `LOAD_BALANCER_IP` was set to `172.18.0.2`, which is the `DEX_IP`, whereas it should be set to the load balancer IP address (which has been created correctly), as it is in the last passing run. It's not doing this because... - The code that sets the `LOAD_BALANCER_IP` address does so conditionally based on the `GKE_BRANCH` environment variable, which is *blank*... so as far as that script can tell, it's not a GKE run. The reason that the `GKE_BRANCH` env var is blank is because... - In [#5730](https://github.com/vmware-tanzu/kubeapps/pull/5730/files#diff-164a87eb83a2101307c123bd6651d8f9355b51a995971d260038a1be44d6f6dbL19) the `GKE_BRANCH` env var was removed and replaced with `GKE_VERSION` everywhere *except* `e2e-test.sh` it seems. I assume this was just an oversight on our part. So this PR just finishes that change by renaming the var in `e2e-test.sh`. ### Benefits Hopefully we can now pass the full integration pipeline. ### Possible drawbacks ### Applicable issues - fixes # ### Additional information Signed-off-by: Michael Nelson --- script/e2e-test.sh | 20 ++++++++++---------- site/netlify.toml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/script/e2e-test.sh b/script/e2e-test.sh index 1b7e85b50c8..527602f59c5 100755 --- a/script/e2e-test.sh +++ b/script/e2e-test.sh @@ -34,7 +34,7 @@ KAPP_CONTROLLER_VERSION=${KAPP_CONTROLLER_VERSION:-"v0.42.0"} CHARTMUSEUM_VERSION=${CHARTMUSEUM_VERSION:-"3.9.1"} # check latest flux releases at https://github.com/fluxcd/flux2/releases FLUX_VERSION=${FLUX_VERSION:-"v0.37.0"} -GKE_BRANCH=${GKE_BRANCH:-} +GKE_VERSION=${GKE_VERSION:-} IMG_PREFIX=${IMG_PREFIX:-"kubeapps/"} TESTS_GROUP=${TESTS_GROUP:-"${ALL_TESTS}"} DEBUG_MODE=${DEBUG_MODE:-false} @@ -62,7 +62,7 @@ fi . "${ROOT_DIR}/script/lib/libutil.sh" # Get the load balancer IP -if [[ -z "${GKE_BRANCH-}" ]]; then +if [[ -z "${GKE_VERSION-}" ]]; then LOAD_BALANCER_IP=$DEX_IP else LOAD_BALANCER_IP=$(kubectl -n nginx-ingress get service nginx-ingress-ingress-nginx-controller -o jsonpath="{.status.loadBalancer.ingress[].ip}") @@ -77,7 +77,7 @@ fi info "###############################################################################################" info "DEBUG_MODE: ${DEBUG_MODE}" info "TESTS_GROUP: ${TESTS_GROUP}" -info "GKE_BRANCH: ${GKE_BRANCH}" +info "GKE_VERSION: ${GKE_VERSION}" info "ROOT_DIR: ${ROOT_DIR}" info "USE_MULTICLUSTER_OIDC_ENV: ${USE_MULTICLUSTER_OIDC_ENV}" info "OLM_VERSION: ${OLM_VERSION}" @@ -247,10 +247,10 @@ installFlux() { url="https://github.com/fluxcd/flux2/releases/download/${release}/install.yaml" namespace=flux-system - # this is a workaround for flux e2e tests failing when run by GitHub Action Runners + # this is a workaround for flux e2e tests failing when run by GitHub Action Runners # due to not being able to deploy source-controller pod error: # Warning FailedScheduling 19s (x7 over 6m) default-scheduler 0/1 nodes are available: 1 Insufficient cpu. - curl -o /tmp/flux_install.yaml -LO "${url}" + curl -o /tmp/flux_install.yaml -LO "${url}" cat /tmp/flux_install.yaml | sed -e 's/cpu: 100m/cpu: 75m/g' | kubectl apply -f - # wait for deployments to be ready @@ -353,7 +353,7 @@ elapsedTimeSince() { [[ "${DEBUG_MODE}" == "true" ]] && set -x; -if [[ "${DEBUG_MODE}" == "true" && -z ${GKE_BRANCH} ]]; then +if [[ "${DEBUG_MODE}" == "true" && -z ${GKE_VERSION} ]]; then info "Docker images loaded in the cluster:" docker exec kubeapps-ci-control-plane crictl images fi @@ -438,7 +438,7 @@ info "Waiting for Kubeapps components to be ready (local chart)..." k8s_wait_for_deployment kubeapps kubeapps-ci # Setting up local Docker registry if not in GKE -if [[ -z "${GKE_BRANCH-}" ]]; then +if [[ -z "${GKE_VERSION-}" ]]; then setupLocalDockerRegistry pushLocalChart fi @@ -575,7 +575,7 @@ fi ########################################### ######## Multi-cluster tests group ######## ########################################### -if [[ -z "${GKE_BRANCH-}" && ("${TESTS_GROUP}" == "${ALL_TESTS}" || "${TESTS_GROUP}" == "${MULTICLUSTER_TESTS}") ]]; then +if [[ -z "${GKE_VERSION-}" && ("${TESTS_GROUP}" == "${ALL_TESTS}" || "${TESTS_GROUP}" == "${MULTICLUSTER_TESTS}") ]]; then sectionStartTime=$(date +%s) info "Running multi-cluster integration tests..." test_command=" @@ -687,7 +687,7 @@ if [[ "${TESTS_GROUP}" == "${ALL_TESTS}" || "${TESTS_GROUP}" == "${OPERATOR_TEST sectionStartTime=$(date +%s) ## Upgrade and run operator test # Operators are not supported in GKE 1.14 and flaky in 1.15, skipping test - if [[ -z "${GKE_BRANCH-}" ]] && [[ -n "${TEST_OPERATORS-}" ]]; then + if [[ -z "${GKE_VERSION-}" ]] && [[ -n "${TEST_OPERATORS-}" ]]; then installOLM "${OLM_VERSION}" # Update Kubeapps settings to enable operators and hence proxying @@ -731,7 +731,7 @@ fi ############################################################ ######## Multi-cluster without Kubeapps tests group ######## ############################################################ -if [[ -z "${GKE_BRANCH-}" && ("${TESTS_GROUP}" == "${ALL_TESTS}" || "${TESTS_GROUP}" == "${MULTICLUSTER_NOKUBEAPPS_TESTS}") ]]; then +if [[ -z "${GKE_VERSION-}" && ("${TESTS_GROUP}" == "${ALL_TESTS}" || "${TESTS_GROUP}" == "${MULTICLUSTER_NOKUBEAPPS_TESTS}") ]]; then sectionStartTime=$(date +%s) info "Running multi-cluster (without Kubeapps cluster) integration tests..." diff --git a/site/netlify.toml b/site/netlify.toml index ae44b696b7b..ffabe47283f 100644 --- a/site/netlify.toml +++ b/site/netlify.toml @@ -4,7 +4,7 @@ command = "hugo --gc --minify --enableGitInfo" ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ." [context.production.environment] -HUGO_VERSION = "0.104.3" +HUGO_VERSION = "0.107.0" HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true"