From e321d511c7af7cd5146ef3dd80f2ddfd60d370d6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 13:12:57 -0500 Subject: [PATCH 1/2] Update buiold scripts --- build_deploy.sh | 1 + pr_check.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/build_deploy.sh b/build_deploy.sh index 1f1f278b..82ff7c2f 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -39,4 +39,5 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then fi #### End +docker buildx use multiarchbuilder docker --config="$DOCKER_CONF" buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push . diff --git a/pr_check.sh b/pr_check.sh index f91f0cbd..c402ce6e 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -14,6 +14,7 @@ docker rm -f $CONTAINER_NAME-run # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it +docker buildx use multiarchbuilder docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . docker buildx build --load -t $CONTAINER_NAME -f build/Dockerfile.pr . From cecb96ca203165261607a8308637ed24902f8022 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 13:31:49 -0500 Subject: [PATCH 2/2] frontend controller --- controllers/frontend_controller_suite_test.go | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index f7831fe9..cb1df411 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -351,15 +351,21 @@ var _ = ginkgo.Describe("Frontend controller with service", func() { if err != nil { return false } - gomega.Expect(nfe.Status.Conditions[0].Type).Should(gomega.Equal(crd.FrontendsReady)) - gomega.Expect(nfe.Status.Conditions[0].Status).Should(gomega.Equal(v1.ConditionTrue)) - gomega.Expect(nfe.Status.Conditions[1].Type).Should(gomega.Equal(crd.ReconciliationFailed)) - gomega.Expect(nfe.Status.Conditions[1].Status).Should(gomega.Equal(v1.ConditionFalse)) - gomega.Expect(nfe.Status.Conditions[2].Type).Should(gomega.Equal(crd.ReconciliationSuccessful)) - gomega.Expect(nfe.Status.Conditions[2].Status).Should(gomega.Equal(v1.ConditionTrue)) - gomega.Expect(nfe.Status.Ready).Should(gomega.Equal(true)) - return true + + // Check the length of Conditions slice before accessing by index + if len(nfe.Status.Conditions) > 2 { + gomega.Expect(nfe.Status.Conditions[0].Type).Should(gomega.Equal(crd.FrontendsReady)) + gomega.Expect(nfe.Status.Conditions[0].Status).Should(gomega.Equal(v1.ConditionTrue)) + gomega.Expect(nfe.Status.Conditions[1].Type).Should(gomega.Equal(crd.ReconciliationFailed)) + gomega.Expect(nfe.Status.Conditions[1].Status).Should(gomega.Equal(v1.ConditionFalse)) + gomega.Expect(nfe.Status.Conditions[2].Type).Should(gomega.Equal(crd.ReconciliationSuccessful)) + gomega.Expect(nfe.Status.Conditions[2].Status).Should(gomega.Equal(v1.ConditionTrue)) + gomega.Expect(nfe.Status.Ready).Should(gomega.Equal(true)) + return true + } + return false }, timeout, interval).Should(gomega.BeTrue()) + }) }) })