From 835fd0d41e4e25d4ec9e48557d3a3a0cd8b2607a Mon Sep 17 00:00:00 2001 From: Sahil Badla Date: Tue, 3 Aug 2021 11:34:51 -0700 Subject: [PATCH] V2 bdd (#286) * #2122: bdd changes for v2 Signed-off-by: sbadla1 * #2122: added makefile for test-bdd module Signed-off-by: sbadla1 * #2122: added makefile for test-bdd module Signed-off-by: sbadla1 * #2122: update rolling-update template Signed-off-by: sbadla1 * #2122: bdd changes for v2 Signed-off-by: sbadla1 * #2122: bdd changes for v2 Signed-off-by: sbadla1 * #2122: bdd changes for v2 Signed-off-by: sbadla1 * #2122: bdd changes for v2 Signed-off-by: sbadla1 --- .github/workflows/bdd.yaml | 4 +++- Makefile | 3 ++- config/default/kustomization.yaml | 5 +++-- config/default/manager_auth_proxy_patch.yaml | 2 -- config/default/manager_image_patch.yaml | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bdd.yaml b/.github/workflows/bdd.yaml index 37ae08e3..0f26d0fa 100644 --- a/.github/workflows/bdd.yaml +++ b/.github/workflows/bdd.yaml @@ -42,4 +42,6 @@ jobs: $HOME/go/bin/godog - name: Cleanup - run: kubectl delete deployment upgrade-manager-controller-manager -n upgrade-manager-system + run: | + kubectl delete deployment upgrade-manager-controller-manager -n upgrade-manager-system + kubectl delete ru test-rollup -n upgrade-manager-system diff --git a/Makefile b/Makefile index a8ed4acd..2493023a 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,9 @@ test: generate fmt vet manifests test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.7.0/hack/setup-envtest.sh source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile coverage.txt go tool cover -html=./coverage.txt -o cover.html - $(MAKE) -C test-bdd/ test +# make test target for test-bdd module +test-bdd: $(MAKE) -C test-bdd/ test # Build manager binary manager: generate fmt vet diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 79e04547..2f84da22 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,12 +1,12 @@ # Adds namespace to all resources. -namespace: test-system +namespace: upgrade-manager-system # Value of this field is prepended to the # names of all resources, e.g. a deployment named # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: test- +namePrefix: upgrade-manager- # Labels to add to all resources and selectors. #commonLabels: @@ -25,6 +25,7 @@ bases: #- ../prometheus patchesStrategicMerge: +- manager_image_patch.yaml # Protect the /metrics endpoint by putting it behind auth. # If you want your controller-manager to expose the /metrics # endpoint w/o any authn/z, please comment the following line. diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 49b1f1ab..a36932d6 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -21,6 +21,4 @@ spec: name: https - name: manager args: - - "--health-probe-bind-address=:8081" - "--metrics-bind-address=127.0.0.1:8080" - - "--leader-elect" diff --git a/config/default/manager_image_patch.yaml b/config/default/manager_image_patch.yaml index af209dae..b6e6d922 100644 --- a/config/default/manager_image_patch.yaml +++ b/config/default/manager_image_patch.yaml @@ -8,5 +8,5 @@ spec: spec: containers: # Change the value of image field below to your controller image URL - - image: keikoproj/rolling-upgrade-controller:1.0.0 + - image: keikoproj/rolling-upgrade-controller:controller-v2 name: manager