From 2846d832e15d32bae25faec2e5bd3164c07c022f Mon Sep 17 00:00:00 2001 From: Taekyu Date: Fri, 15 Jul 2022 15:38:46 +0900 Subject: [PATCH 1/2] rollback. "[WIP] reduce cluster_id length" --- templates/decapod-apps/service-mesh-wf.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/decapod-apps/service-mesh-wf.yaml b/templates/decapod-apps/service-mesh-wf.yaml index 8ea7d07..5744d62 100644 --- a/templates/decapod-apps/service-mesh-wf.yaml +++ b/templates/decapod-apps/service-mesh-wf.yaml @@ -196,8 +196,7 @@ spec: CLUSTER_ID={{workflow.parameters.cluster_id}} kube_params="" if [[ -n "${CLUSTER_ID}" ]]; then - CLUSTER_ID=$(echo "${CLUSTER_ID:0:8}") - kube_secret=$(kubectl get secret -n ${CLUSTER_ID} ${CLUSTER_ID}-kubeconfig -o jsonpath="{.data.value}" | base64 -d) + kube_secret=$(kubectl get secret -n {{workflow.parameters.cluster_id}} {{workflow.parameters.cluster_id}}-kubeconfig -o jsonpath="{.data.value}" | base64 -d) echo -e "kube_secret:\n$kube_secret" | head -n 5 cat <<< "$kube_secret" > /etc/kubeconfig kube_params+="--kubeconfig=/etc/kubeconfig" @@ -257,8 +256,7 @@ spec: CLUSTER_ID={{workflow.parameters.cluster_id}} kube_params="" if [[ -n "${CLUSTER_ID}" ]]; then - CLUSTER_ID=$(echo "${CLUSTER_ID:0:8}") - kube_secret=$(kubectl get secret -n ${CLUSTER_ID} ${CLUSTER_ID}-kubeconfig -o jsonpath="{.data.value}" | base64 -d) + kube_secret=$(kubectl get secret -n {{workflow.parameters.cluster_id}} {{workflow.parameters.cluster_id}}-kubeconfig -o jsonpath="{.data.value}" | base64 -d) echo -e "kube_secret:\n$kube_secret" | head -n 5 cat <<< "$kube_secret" > /etc/kubeconfig kube_params+="--kubeconfig=/etc/kubeconfig" From 03ae64e47b366e23c0ec574dec83192465a81504 Mon Sep 17 00:00:00 2001 From: Taekyu Date: Mon, 18 Jul 2022 15:41:35 +0900 Subject: [PATCH 2/2] bugfix. delete substr function for cluster id --- templates/decapod-apps/remove-lma-uniformed-wftpl.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/templates/decapod-apps/remove-lma-uniformed-wftpl.yaml b/templates/decapod-apps/remove-lma-uniformed-wftpl.yaml index 2016137..c69a9f6 100644 --- a/templates/decapod-apps/remove-lma-uniformed-wftpl.yaml +++ b/templates/decapod-apps/remove-lma-uniformed-wftpl.yaml @@ -97,7 +97,6 @@ spec: kube_params="" if [[ -n "{{workflow.parameters.cluster_id}}" ]]; then - CLUSTER_ID=$(echo "${CLUSTER_ID:0:8}") kube_secret=$(kubectl get secret -n ${CLUSTER_ID} ${CLUSTER_ID}-kubeconfig -o jsonpath="{.data.value}" | base64 -d) echo -e "kube_secret:\n$kube_secret" | head -n 5 cat <<< "$kube_secret" > /etc/kubeconfig @@ -125,7 +124,6 @@ spec: kube_params="" if [[ -n "{{workflow.parameters.cluster_id}}" ]]; then - CLUSTER_ID=$(echo "${CLUSTER_ID:0:8}") kube_secret=$(kubectl get secret -n ${CLUSTER_ID} ${CLUSTER_ID}-kubeconfig -o jsonpath="{.data.value}" | base64 -d) echo -e "kube_secret:\n$kube_secret" | head -n 5 cat <<< "$kube_secret" > /etc/kubeconfig @@ -152,7 +150,6 @@ spec: CLUSTER_ID={{workflow.parameters.cluster_id}} kube_params="" if [[ -n "{{workflow.parameters.cluster_id}}" ]]; then - CLUSTER_ID=$(echo "${CLUSTER_ID:0:8}") kube_secret=$(kubectl get secret -n ${CLUSTER_ID} ${CLUSTER_ID}-kubeconfig -o jsonpath="{.data.value}" | base64 -d) cat <<< "$kube_secret" > /etc/kubeconfig