Skip to content

Commit

Permalink
modify kubeconfig secret name
Browse files Browse the repository at this point in the history
  • Loading branch information
robertchoi80 committed Feb 27, 2022
1 parent 6938e8b commit 6520a17
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions templates/decapod-apps/remove-lma-uniformed-wftpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ spec:
entrypoint: process
arguments:
parameters:
# 'cluster_id' is only for TKS use-case
# TODO: better to rename this to 'site_name' later
- name: cluster_id
value: ""
- name: app_prefix
value: ""
# Filter to filter argocd apps
Expand All @@ -28,7 +32,7 @@ spec:
- name: namespace
value: "lma"
- name: kubeconfig_secret_name
value: "{{workflow.parameters.app_prefix}}-kubeconfig"
value: "{{workflow.parameters.cluster_id}}-kubeconfig"

- - name: removeLMA
templateRef:
Expand Down Expand Up @@ -86,7 +90,7 @@ spec:
echo "Deleting prometheus CR..."
echo "kubeconfig_secret: {{inputs.parameters.kubeconfig_secret_name}}."
# Delete prometheus CR
if [[ "{{inputs.parameters.kubeconfig_secret_name}}" == "-kubeconfig" ]]; then
if [[ -z "{{workflow.parameters.cluster_id}}" ]]; then
kubectl delete prometheus --all -n {{inputs.parameters.namespace}}
else
cat <<< "$KUBE_CONFIG" > /etc/kubeconfig
Expand Down

0 comments on commit 6520a17

Please sign in to comment.