From e4012f2a44714c21cb2887a922ce70a9a7fc3408 Mon Sep 17 00:00:00 2001 From: "taekyu.kang" Date: Tue, 17 Oct 2023 12:00:55 +0900 Subject: [PATCH 1/4] bugfix. fix syntax error --- git-repo/create-cluster-repo.yaml | 2 +- tks-cluster/create-usercluster-wftpl.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/git-repo/create-cluster-repo.yaml b/git-repo/create-cluster-repo.yaml index dfca470e..231297c1 100644 --- a/git-repo/create-cluster-repo.yaml +++ b/git-repo/create-cluster-repo.yaml @@ -195,7 +195,7 @@ spec: path: /mnt/out/infra_provider.txt - name: managed_cluster valueFrom: - default: "Something wrong" + default: "false" path: /mnt/out/managed_cluster.txt - name: createRepoCredential diff --git a/tks-cluster/create-usercluster-wftpl.yaml b/tks-cluster/create-usercluster-wftpl.yaml index b228d1f8..68d5e0c5 100644 --- a/tks-cluster/create-usercluster-wftpl.yaml +++ b/tks-cluster/create-usercluster-wftpl.yaml @@ -405,6 +405,7 @@ spec: ;; byoh) + kcp_count=$(kubectl get kcp -n $CLUSTER_ID $CLUSTER_ID | grep -v NAME | wc -l) kubectl wait --for=condition=Available --timeout=600s kcp -n $CLUSTER_ID $CLUSTER_ID KUBECONFIG_WORKLOAD=$(kubectl get secret -n $CLUSTER_ID $CLUSTER_ID-kubeconfig -o jsonpath="{.data.value}" | base64 -d) @@ -482,7 +483,7 @@ spec: EOF kubectl --kubeconfig kubeconfig_workload apply -f sc-taco-storage.yaml else - echo "Wrong AWS Cluster type!" + echo "Wrong Cluster type!" exit 1 fi cat <<< $TKS_KUBECONFIG_WORKLOAD > tks_kubeconfig_workload From 146e1a28bc00317fac1a3e6f1b565e46d4cd4175 Mon Sep 17 00:00:00 2001 From: "taekyu.kang" Date: Tue, 17 Oct 2023 14:53:59 +0900 Subject: [PATCH 2/4] trivial. for test --- tks-cluster/create-usercluster-wftpl.yaml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/tks-cluster/create-usercluster-wftpl.yaml b/tks-cluster/create-usercluster-wftpl.yaml index 68d5e0c5..95fb88ac 100644 --- a/tks-cluster/create-usercluster-wftpl.yaml +++ b/tks-cluster/create-usercluster-wftpl.yaml @@ -216,9 +216,7 @@ spec: "target_cluster": "" } ] - when: >- - {{steps.tks-create-cluster-repo.outputs.parameters.infra_provider}} != byoh && - {{steps.tks-create-cluster-repo.outputs.parameters.managed_cluster}} == false + when: "{{steps.tks-create-cluster-repo.outputs.parameters.infra_provider}} != byoh" - - name: install-addons-common templateRef: @@ -235,18 +233,6 @@ spec: "namespace": "taco-system", "target_cluster": "" }, - { - "app_group": "tks-cluster", - "path": "metrics-server", - "namespace": "kube-system", - "target_cluster": "" - }, - { - "app_group": "tks-cluster", - "path": "cluster-autoscaler", - "namespace": "kube-system", - "target_cluster": "" - }, { "app_group": "tks-cluster", "path": "argo-rollouts", @@ -318,7 +304,7 @@ spec: value: | [ { - "app_group": "tks-cluster-byoh", + "app_group": "tks-cluster", "path": "local-path-provisioner", "namespace": "taco-system", "target_cluster": "" From 5f023f03893b7d7338da7463736ec5305ee515eb Mon Sep 17 00:00:00 2001 From: "taekyu.kang" Date: Wed, 18 Oct 2023 00:25:03 +0900 Subject: [PATCH 3/4] feature. add parameter for creating stack --- tks-cli/tks-cli.yaml | 3 +++ tks-stack/tks-stack-create.yaml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/tks-cli/tks-cli.yaml b/tks-cli/tks-cli.yaml index 50a3817d..754ed980 100644 --- a/tks-cli/tks-cli.yaml +++ b/tks-cli/tks-cli.yaml @@ -90,6 +90,7 @@ spec: - name: description - name: infra_conf - name: cloud_service + - name: cluster_endpoint container: name: create-usercluster image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.3 @@ -109,6 +110,7 @@ spec: TKS_USER_NODE=$(echo "{{inputs.parameters.infra_conf}}" | jq -r '.tksUserNode') CL_NAME="{{inputs.parameters.cluster_name}}" + echo "* Create $CL_NAME cluster" tks cluster create ${CL_NAME} \ --stack-template-id "{{inputs.parameters.stack_template_id}}" \ @@ -116,6 +118,7 @@ spec: --cloud-account-id "{{inputs.parameters.cloud_account_id}}" \ --description "{{inputs.parameters.description}}" \ --cloud-service "{{inputs.parameters.cloud_service}}" \ + --cluster-endpoint "{{inputs.parameters.cluster_endpoint}}" \ --stack 1 \ --tks-cp-node $TKS_CP_NODE \ --tks-infra-node $TKS_INFRA_NODE \ diff --git a/tks-stack/tks-stack-create.yaml b/tks-stack/tks-stack-create.yaml index 0743262b..f0acdc30 100644 --- a/tks-stack/tks-stack-create.yaml +++ b/tks-stack/tks-stack-create.yaml @@ -29,6 +29,8 @@ spec: value: "s3" - name: base_repo_branch value: develop + - name: cluster_endpoint + value: "" templates: - name: main @@ -60,6 +62,8 @@ spec: value: "{{workflow.parameters.infra_conf}}" - name: cloud_service value: "{{workflow.parameters.cloud_service}}" + - name: cluster_endpoint + value: "{{workflow.parameters.cluster_endpoint}}" - - name: call-create-appgroup-for-LMA templateRef: From a7fb872e02808cfcddb841d0b0e3044fdc61011f Mon Sep 17 00:00:00 2001 From: "taekyu.kang" Date: Wed, 18 Oct 2023 10:17:17 +0900 Subject: [PATCH 4/4] tirivial. update image version. tks-e2e-test:v3.1.4 --- tks-cli/tks-cli.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tks-cli/tks-cli.yaml b/tks-cli/tks-cli.yaml index 754ed980..164f2514 100644 --- a/tks-cli/tks-cli.yaml +++ b/tks-cli/tks-cli.yaml @@ -12,7 +12,7 @@ spec: - name: login-tks-api container: name: login-tks-api - image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.3 + image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.4 envFrom: - secretRef: name: "tks-api-secret" @@ -31,7 +31,7 @@ spec: - name: description container: name: create-organization - image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.3 + image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.4 envFrom: - secretRef: name: "tks-api-secret" @@ -93,7 +93,7 @@ spec: - name: cluster_endpoint container: name: create-usercluster - image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.3 + image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.4 envFrom: - secretRef: name: "tks-api-secret" @@ -162,7 +162,7 @@ spec: - name: organization_id container: name: install-usercluster - image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.3 + image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.4 envFrom: - secretRef: name: "tks-api-secret" @@ -215,7 +215,7 @@ spec: - name: cluster_id container: name: delete-usercluster - image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.3 + image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.4 envFrom: - secretRef: name: "tks-api-secret" @@ -258,7 +258,7 @@ spec: - name: description container: name: create-appgroup - image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.3 + image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.4 envFrom: - secretRef: name: "tks-api-secret" @@ -308,7 +308,7 @@ spec: - name: appgroup_id container: name: delete-appgroup - image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.3 + image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.4 envFrom: - secretRef: name: "tks-api-secret" @@ -348,7 +348,7 @@ spec: - name: name container: name: get-appgroup-id - image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.3 + image: harbor.taco-cat.xyz/tks/tks-e2e-test:v3.1.4 envFrom: - secretRef: name: "tks-api-secret"