From ddc7cd3eadbfd8e90591d1bc68347f3cecca0ed1 Mon Sep 17 00:00:00 2001 From: Robert Choi Date: Tue, 21 Dec 2021 18:26:17 +0900 Subject: [PATCH 1/2] use app_prefix as workflow param --- deploy_apps/tks-lma-federation-wftpl.yaml | 6 ++++-- tks-cluster/create-usercluster-wftpl.yaml | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/deploy_apps/tks-lma-federation-wftpl.yaml b/deploy_apps/tks-lma-federation-wftpl.yaml index 0f14695e..eb7c4674 100644 --- a/deploy_apps/tks-lma-federation-wftpl.yaml +++ b/deploy_apps/tks-lma-federation-wftpl.yaml @@ -9,8 +9,8 @@ spec: parameters: - name: site_name value: "hanu-reference" - - name: app_group - value: "lma" + - name: logging_component + value: "efk" # Replace these urls properly for your env # - name: site_repo_url value: "https://github.com/openinfradev/decapod-site" @@ -18,6 +18,8 @@ spec: value: "https://github.com/openinfradev/decapod-manifests" - name: revision value: "main" + - name: app_prefix + value: "{{=sprig.substr(0, 8, workflow.parameters.site_name)}}" ########################## # For tks-info task # ########################## diff --git a/tks-cluster/create-usercluster-wftpl.yaml b/tks-cluster/create-usercluster-wftpl.yaml index e23252e6..4146fcb4 100644 --- a/tks-cluster/create-usercluster-wftpl.yaml +++ b/tks-cluster/create-usercluster-wftpl.yaml @@ -24,6 +24,8 @@ spec: value: "" - name: revision value: "main" + - name: app_prefix + value: "{{=sprig.substr(0, 8, workflow.parameters.site_name)}}" - name: tks_info_host value: "tks-info.tks.svc" @@ -61,7 +63,6 @@ spec: { "app_group": "tks-cluster", "path": "cluster-api-aws", - "app_prefix": "{{=sprig.substr(0, 8, workflow.parameters.cluster_id)}}", "namespace": "argo", "target_cluster": "tks-admin" } @@ -82,7 +83,6 @@ spec: { "app_group": "tks-cluster", "path": "kubernetes-addons", - "app_prefix": "{{=sprig.substr(0, 8, workflow.parameters.cluster_id)}}", "namespace": "taco-system", "target_cluster": "" } From 2a2b9d26bbc2c1ff323eab4018f05e3e893d38a3 Mon Sep 17 00:00:00 2001 From: Robert Choi Date: Tue, 21 Dec 2021 18:27:03 +0900 Subject: [PATCH 2/2] use decapod-flow's create-app workflow for ingress --- deploy_apps/tks-ingress-controller-wftpl.yaml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/deploy_apps/tks-ingress-controller-wftpl.yaml b/deploy_apps/tks-ingress-controller-wftpl.yaml index e7c6c37d..2844b289 100644 --- a/deploy_apps/tks-ingress-controller-wftpl.yaml +++ b/deploy_apps/tks-ingress-controller-wftpl.yaml @@ -7,18 +7,15 @@ spec: entrypoint: deploy arguments: parameters: - - name: contract_id - value: "0010010a-d6cb-459b-9148-1b02ac545753" - - name: cluster_id + # Use cluster_id here + - name: site_name value: "011b88fa-4d53-439f-9336-67845f994051" - - name: git_account - value: "tks-management" + - name: manifest_repo_url + value: "" - name: revision value: main - - name: tks_admin - value: "tks-admin" - - name: app_group - value: "tks-cluster" + - name: app_prefix + value: "{{=sprig.substr(0, 8, workflow.parameters.site_name)}}" volumes: - name: config @@ -37,12 +34,12 @@ spec: - - name: install-ingress-controller templateRef: - name: tks-create-application-new + name: create-application template: installApps arguments: parameters: - name: list value: | [ - { "path": "ingress-nginx", "namespace": "taco-system" } + { "app_group": "tks-cluster", "path": "ingress-nginx", "namespace": "taco-system" } ]