Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add and remove nodes during the test #27

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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