Skip to content

Commit

Permalink
chore: change calculate aks node num
Browse files Browse the repository at this point in the history
  • Loading branch information
JashBook committed Jan 17, 2025
1 parent 0f7e044 commit 7c18a41
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/terraform-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,17 @@ jobs:
NODE_SIZE="${{ inputs.node-size }}"
if [[ ("${{ inputs.cloud-provider }}" == "eks" || "${{ inputs.cloud-provider }}" == "vke" || "${{ inputs.cloud-provider }}" == "aks" || "${{ inputs.cloud-provider }}" == "aks-cn" ) && -n "${COUNTS}" && -z "${NODE_SIZE}" ]]; then
if [[ ("${{ inputs.cloud-provider }}" == "eks" || "${{ inputs.cloud-provider }}" == "vke" || "${{ inputs.cloud-provider }}" == "aks-cn" ) && -n "${COUNTS}" && -z "${NODE_SIZE}" ]]; then
NODE_SIZE="$(( $COUNTS * 2 ))"
elif [[ "${{ inputs.cloud-provider }}" == "gke" && -n "${COUNTS}" && -z "${NODE_SIZE}" ]]; then
NODE_SIZE="$(( $COUNTS / 4 + 1 ))"
elif [[ "${{ inputs.cloud-provider }}" == "aks" && -n "${COUNTS}" && -z "${NODE_SIZE}" ]]; then
NODE_SIZE="$(( $COUNTS / 2 ))"
NODE_TYPE="Standard_D16s_v3"
if [[ "$NODE_SIZE" -lt 3 ]]; then
NODE_SIZE="$(( $COUNTS * 2 ))"
NODE_TYPE="Standard_D4s_v3"
fi
fi
if [[ ("${{ inputs.cloud-provider }}" == "eks" || "${{ inputs.cloud-provider }}" == "vke" || "${{ inputs.cloud-provider }}" == "aks" || "${{ inputs.cloud-provider }}" == "aks-cn" ) && -z "${NODE_SIZE}" && -z "${{ inputs.test-mode }}" ]]; then
Expand Down

0 comments on commit 7c18a41

Please sign in to comment.