Skip to content

Commit

Permalink
Mount config and deployments dirs to smoke containers (#5740)
Browse files Browse the repository at this point in the history
  • Loading branch information
oseoin authored Jun 13, 2024
1 parent 5c8e549 commit f8fa93d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/actions/smoke-tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} \
Expand Down
17 changes: 10 additions & 7 deletions internal/k8s/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 2 additions & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit f8fa93d

Please sign in to comment.