Skip to content

Commit

Permalink
feature. change variables (cluster infra_conf)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktkfree committed Sep 8, 2023
1 parent 0d8e854 commit 7bf1354
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
8 changes: 3 additions & 5 deletions git-repo/create-cluster-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ spec:
## Fetch cluster params from cluster_info file ##
val_ssh_key=$(echo $CLUSTER_INFO | jq -r '.sshKeyName')
val_region=$(echo $CLUSTER_INFO | jq -r '.clusterRegion')
val_num_of_az=$(echo $CLUSTER_INFO | jq -r '.mdNumOfAz')
val_cpReplicas=$(echo $CLUSTER_INFO | jq -r '.cpReplicas')
val_tksCpNode=$(echo $CLUSTER_INFO | jq -r '.tksCpNode')
val_tksInfraNode=$(echo $CLUSTER_INFO | jq -r '.tksInfraNode')
val_tksInfraNodeMax=$(echo $CLUSTER_INFO | jq -r '.tksInfraNodeMax')
val_tksInfraNodeType=$(echo $CLUSTER_INFO | jq -r '.tksInfraNodeType')
Expand All @@ -109,9 +108,8 @@ spec:
yq -i e ".global.sshKeyName=\"$val_ssh_key\"" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
yq -i e ".global.clusterRegion=\"$val_region\"" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
yq -i e ".global.mdNumOfAz=$val_num_of_az" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
yq -i e ".global.cpReplicas=$val_cpReplicas" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
yq -i e ".global.tksCpNode=$val_tksCpNode" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
yq -i e ".global.tksInfraNode=$val_tksInfraNode" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
yq -i e ".global.tksInfraNodeMax=$val_tksInfraNodeMax" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
yq -i e ".global.tksInfraNodeType=\"$val_tksInfraNodeType\"" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
Expand Down
2 changes: 1 addition & 1 deletion tests/tks-e2e-aws-msa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
- name: description
value: "e2e-test"
- name: infra_conf
value: '{\"cpNodeCnt\":3,\"tksNodeCnt\":3,\"userNodeCnt\":1}'
value: '{\"tksCpNode\":1,\"tksInfraNode\":1,\"tksUserNode\":1}'
- - name: call-validate-cluster
templateRef:
name: tks-validate-usercluster
Expand Down
2 changes: 1 addition & 1 deletion tests/tks-e2e-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
- name: description
value: "e2e-test"
- name: infra_conf
value: '{\"cpNodeCnt\":3,\"tksNodeCnt\":3,\"userNodeCnt\":1}'
value: '{\"tksCpNode\":1,\"tksInfraNode\":1,\"tksUserNode\":1}'
- - name: call-validate-cluster
templateRef:
name: tks-validate-usercluster
Expand Down
26 changes: 13 additions & 13 deletions tks-cli/tks-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
- name: login-tks-api
container:
name: login-tks-api
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v2.1.7
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.1
envFrom:
- secretRef:
name: "tks-api-secret"
Expand All @@ -31,7 +31,7 @@ spec:
- name: description
container:
name: create-organization
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v2.1.7
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.1
envFrom:
- secretRef:
name: "tks-api-secret"
Expand Down Expand Up @@ -91,7 +91,7 @@ spec:
- name: infra_conf
container:
name: create-usercluster
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v2.1.7
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.1
envFrom:
- secretRef:
name: "tks-api-secret"
Expand All @@ -103,9 +103,9 @@ spec:
echo "infra_conf : {{inputs.parameters.infra_conf}}"
CP_NODE_CNT=$(echo "{{inputs.parameters.infra_conf}}" | jq -r '.cpNodeCnt')
TKS_NODE_CNT=$(echo "{{inputs.parameters.infra_conf}}" | jq -r '.tksNodeCnt')
USER_NODE_CNT=$(echo "{{inputs.parameters.infra_conf}}" | jq -r '.userNodeCnt')
TKS_CP_NODE=$(echo "{{inputs.parameters.infra_conf}}" | jq -r '.tksCpNode')
TKS_INFRA_NODE=$(echo "{{inputs.parameters.infra_conf}}" | jq -r '.tksInfraNode')
TKS_USER_NODE=$(echo "{{inputs.parameters.infra_conf}}" | jq -r '.tksUserNode')
CL_NAME="{{inputs.parameters.cluster_name}}"
echo "* Create $CL_NAME cluster"
Expand All @@ -114,9 +114,9 @@ spec:
--organization-id "{{inputs.parameters.organization_id}}" \
--cloud-account-id "{{inputs.parameters.cloud_account_id}}" \
--description "{{inputs.parameters.description}}" \
--cp-node-cnt $CP_NODE_CNT \
--tks-node-cnt $TKS_NODE_CNT \
--user-node-cnt $USER_NODE_CNT
--tks-cp-node $TKS_CP_NODE \
--tks-infra-node $TKS_INFRA_NODE \
--tks-user-node $TKS_USER_NODE
threshold=60
for i in $(seq 1 $threshold)
Expand Down Expand Up @@ -156,7 +156,7 @@ spec:
- name: cluster_id
container:
name: delete-usercluster
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v2.1.7
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.1
envFrom:
- secretRef:
name: "tks-api-secret"
Expand Down Expand Up @@ -199,7 +199,7 @@ spec:
- name: description
container:
name: create-appgroup
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v2.1.7
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.1
envFrom:
- secretRef:
name: "tks-api-secret"
Expand Down Expand Up @@ -249,7 +249,7 @@ spec:
- name: appgroup_id
container:
name: delete-appgroup
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v2.1.7
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.1
envFrom:
- secretRef:
name: "tks-api-secret"
Expand Down Expand Up @@ -289,7 +289,7 @@ spec:
- name: name
container:
name: get-appgroup-id
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v2.1.7
image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.1
envFrom:
- secretRef:
name: "tks-api-secret"
Expand Down

0 comments on commit 7bf1354

Please sign in to comment.