Skip to content

Commit 5dd0d6f

Browse files
authored
feat: Support nodes, disk and TTL values in integration test config (#17)
1 parent 5b66858 commit 5dd0d6f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

run-integration-test/action.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,15 @@ runs:
6161
export INSTANCE_SIZE=$(yq '.instance-size' -e ./tests/infrastructure.yaml)
6262
INSTANCE_TYPE=$(yq '.[env(KUBERNETES_DISTRIBUTION)].[env(KUBERNETES_ARCHITECTURE)].[env(INSTANCE_SIZE)]' -e "$GITHUB_ACTION_PATH/instances.yml")
6363
64+
# Optional config options
65+
CLUSTER_TTL=$(yq '.cluster-ttl' -e ./tests/infrastructure.yaml || echo "4h")
66+
INSTANCE_NODES=$(yq '.nodes' -e ./tests/infrastructure.yaml || echo "1")
67+
INSTANCE_DISK=$(yq '.disk' -e ./tests/infrastructure.yaml|| echo "50")
68+
6469
echo "INSTANCE_TYPE=$INSTANCE_TYPE" | tee -a "$GITHUB_ENV"
70+
echo "CLUSTER_TTL=$CLUSTER_TTL" | tee -a "$GITHUB_ENV"
71+
echo "INSTANCE_NODES=$INSTANCE_NODES" | tee -a "$GITHUB_ENV"
72+
echo "INSTANCE_DISK=$INSTANCE_DISK" | tee -a "$GITHUB_ENV"
6573
6674
############################
6775
# Validate Test Parameters #
@@ -99,9 +107,9 @@ runs:
99107
instance-type: ${{ env.INSTANCE_TYPE }}
100108
kubernetes-distribution: ${{ env.KUBERNETES_DISTRIBUTION }}
101109
kubernetes-version: ${{ env.KUBERNETES_VERSION }}
102-
ttl: 4h # todo: allow this to be configurable
103-
disk: 50 # todo: allow this to be configurable
104-
nodes: 1 # todo: allow this to be configurable
110+
ttl: ${{ env.CLUSTER_TTL }}
111+
disk: ${{ env.INSTANCE_DISK }}
112+
nodes: ${{ env.INSTANCE_NODES }}
105113
tags: |
106114
- key: node-architecture
107115
value: ${{ env.KUBERNETES_ARCHITECTURE }}

0 commit comments

Comments
 (0)