Skip to content

Commit

Permalink
Finish switching from GKE_BRANCH to GKE_VERSION (from #5730) (#5780)
Browse files Browse the repository at this point in the history
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 <[email protected]>

<!--
Before you open the request please review the following guidelines and
tips to help it be more easily integrated:

 - Describe the scope of your change - i.e. what the change does.
 - Describe any known limitations with your change.
- Please run any tests or examples that can exercise your modified code.

 Thank you for contributing!
 -->

### Description of the change

<!-- Describe the scope of your change - i.e. what the change does. -->
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

<!-- What benefits will be realized by the code change? -->

Hopefully we can now pass the full integration pipeline.

### Possible drawbacks

<!-- Describe any known limitations with your change -->

### Applicable issues

<!-- Enter any applicable Issues here (You can reference an issue using
#) -->

- fixes #

### Additional information

<!-- If there's anything else that's important and relevant to your pull
request, mention that information here.-->

Signed-off-by: Michael Nelson <[email protected]>
  • Loading branch information
absoludity authored Dec 6, 2022
1 parent a906b91 commit 4edd89e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions script/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}")
Expand All @@ -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}"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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="
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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..."

Expand Down
2 changes: 1 addition & 1 deletion site/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 4edd89e

Please sign in to comment.