Skip to content

Commit

Permalink
chore: terraform-init.yml support eks dj
Browse files Browse the repository at this point in the history
  • Loading branch information
JashBook committed Sep 27, 2024
1 parent 1d09ff5 commit 59e0a03
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/terraform-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ jobs:
DEPLOY_PATH=""
if [[ "${{ inputs.cloud-provider }}" == "eks" && "${{ inputs.test-mode }}" == "performance" ]]; then
DEPLOY_PATH="./aws/eks-default-vpc-multinode"
elif [[ "${{ inputs.cloud-provider }}" == "eks" && "${{ inputs.region }}" == "ap-northeast-1" ]]; then
DEPLOY_PATH="./aws/eks-default-vpc-dj"
elif [[ "${{ inputs.cloud-provider }}" == "eks" ]]; then
DEPLOY_PATH="./aws/eks-default-vpc"
elif [[ "${{ inputs.cloud-provider }}" == "vke" ]]; then
Expand Down Expand Up @@ -197,13 +199,27 @@ jobs:
fi
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.region }}" == "ap-northeast-1" && -n "${COUNTS}" && -z "${NODE_SIZE}" ]]; then
NODE_SIZE="$COUNTS"
elif [[ ("${{ inputs.cloud-provider }}" == "eks" || "${{ inputs.cloud-provider }}" == "vke" || "${{ inputs.cloud-provider }}" == "aks" || "${{ 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 ))"
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
if [[ "${{ inputs.cloud-provider }}" == "eks" && "${{ inputs.region }}" == "ap-northeast-1" && -z "${NODE_SIZE}" && -z "${{ inputs.test-mode }}" ]]; then
if [[ "${{ inputs.kb-version }}" == "v0.5."* ]]; then
NODE_SIZE=2
elif [[ "${{ inputs.kb-version }}" == "v0.6."* ]]; then
NODE_SIZE=8
elif [[ "${{ inputs.kb-version }}" == "v0.7."* ]]; then
NODE_SIZE=16
elif [[ "${{ inputs.kb-version }}" == "v0.8."* ]]; then
NODE_SIZE=19
elif [[ "${{ inputs.kb-version }}" == "v0.9."* ]]; then
NODE_SIZE=21
fi
elif [[ ("${{ 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
if [[ "${{ inputs.kb-version }}" == "v0.5."* ]]; then
NODE_SIZE=4
elif [[ "${{ inputs.kb-version }}" == "v0.6."* ]]; then
Expand Down

0 comments on commit 59e0a03

Please sign in to comment.