Skip to content

Commit

Permalink
feat: Add and remove nodes during the test (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
JorTurFer authored Oct 30, 2023
1 parent 4475357 commit 3521a0a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/execute-performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
- name: Get cluster context
run: make get-cluster-context

- name: Scale cluster
run: make scale-node-pool
env:
NODE_POOL_SIZE: 3

- name: Deploy dependencies
run: make deploy

Expand All @@ -43,3 +48,9 @@ jobs:
- name: Cleanup dependencies
run: make undeploy
if: ${{ always() }}

- name: Scale cluster
if: ${{ always() }}
run: make scale-node-pool
env:
NODE_POOL_SIZE: 1
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ REPO_URL ?= https://github.com/kedacore/keda-performance.git
REPO_BRANCH ?= main
TEST_CONFIG ?= config.json

NODE_POOL_SIZE ?= 1

##################################################
# Kubernetes context #
##################################################
Expand All @@ -36,6 +38,14 @@ get-cluster-context: az-login ## Get Azure cluster context.
--subscription $(TF_AZURE_SUBSCRIPTION) \
--resource-group $(TF_AZURE_RESOURCE_GROUP)

.PHONY: scale-node-pool
scale-node-pool: az-login ## Scale nodepool.
@az aks scale \
--name $(TEST_CLUSTER_NAME) \
--subscription $(TF_AZURE_SUBSCRIPTION) \
--resource-group $(TF_AZURE_RESOURCE_GROUP) \
--node-count $(NODE_POOL_SIZE)

##################################################
# Deployments #
##################################################
Expand Down

0 comments on commit 3521a0a

Please sign in to comment.