diff --git a/.github/actions/smoke-tests/action.yaml b/.github/actions/smoke-tests/action.yaml index a85aba1415..e0a02ca534 100644 --- a/.github/actions/smoke-tests/action.yaml +++ b/.github/actions/smoke-tests/action.yaml @@ -62,6 +62,8 @@ runs: --name test-runner-${{ github.run_id }} \ --network=kind \ -v ${{ github.workspace }}/tests:/workspace/tests \ + -v ${{ github.workspace }}/deployments:/workspace/deployments \ + -v ${{ github.workspace }}/config:/workspace/config \ -v ~/.kube/kind/config:/root/.kube/config ${{ inputs.test-image }} \ --context=kind-${{ github.run_id }} \ --image=${{ inputs.image-name }}:${{ inputs.tag }} \ diff --git a/internal/k8s/controller.go b/internal/k8s/controller.go index a4a5f4d499..9e2aec26f6 100644 --- a/internal/k8s/controller.go +++ b/internal/k8s/controller.go @@ -944,15 +944,18 @@ func (lbc *LoadBalancerController) updateNumberOfIngressControllerReplicas(contr } // handle virtualservers - resources = lbc.findVirtualServersUsingRatelimitScaling() - resourceExes = lbc.createExtendedResources(resources) - for _, vserver := range resourceExes.VirtualServerExes { - found = true - _, err := lbc.configurator.AddOrUpdateVirtualServer(vserver) - if err != nil { - glog.Errorf("Error updating ratelimit for VirtualServer %s/%s: %s", vserver.VirtualServer.Namespace, vserver.VirtualServer.Name, err) + if lbc.areCustomResourcesEnabled { + resources = lbc.findVirtualServersUsingRatelimitScaling() + resourceExes = lbc.createExtendedResources(resources) + for _, vserver := range resourceExes.VirtualServerExes { + found = true + _, err := lbc.configurator.AddOrUpdateVirtualServer(vserver) + if err != nil { + glog.Errorf("Error updating ratelimit for VirtualServer %s/%s: %s", vserver.VirtualServer.Namespace, vserver.VirtualServer.Name, err) + } } } + } return found } diff --git a/tests/Makefile b/tests/Makefile index 28c3f58bf1..6e24864055 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -55,6 +55,8 @@ run-tests-in-kind: ## Run tests in Kind docker run --network=kind --rm \ -v $(KIND_KUBE_CONFIG_FOLDER):/root/.kube \ -v $(ROOT_DIR)/tests:/workspace/tests \ + -v $(ROOT_DIR)/deployments:/workspace/deployments \ + -v $(ROOT_DIR)/config:/workspace/config \ $(TEST_PREFIX):$(TEST_TAG) \ --context=kind-$(strip $(K8S_CLUSTER_NAME)) \ --image=$(BUILD_IMAGE) --image-pull-policy=$(PULL_POLICY) \