From 1f2408319ff462bddacb836f24b9b4e8dbe4e0d7 Mon Sep 17 00:00:00 2001 From: Markus Keil Date: Tue, 30 Jan 2024 14:52:04 +0100 Subject: [PATCH] migrate env check --- charts/argocd-cluster-watcher/Chart.yaml | 2 +- charts/argocd-cluster-watcher/templates/config.yaml | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/charts/argocd-cluster-watcher/Chart.yaml b/charts/argocd-cluster-watcher/Chart.yaml index 03d7142..a856aee 100644 --- a/charts/argocd-cluster-watcher/Chart.yaml +++ b/charts/argocd-cluster-watcher/Chart.yaml @@ -3,7 +3,7 @@ name: argocd-cluster-watcher description: Adds clusters from Rancher to ArgoCD via CRD objects type: application -version: 0.0.3 +version: 0.0.4 # App metadata maintainers: diff --git a/charts/argocd-cluster-watcher/templates/config.yaml b/charts/argocd-cluster-watcher/templates/config.yaml index 07dfd9e..9bbbca7 100644 --- a/charts/argocd-cluster-watcher/templates/config.yaml +++ b/charts/argocd-cluster-watcher/templates/config.yaml @@ -47,14 +47,8 @@ data: SHORTCLUSTERNAME=$(echo $CLUSTERS | jq -r --arg CLUSTERNAME "$CLUSTERNAME" '.[] | select(.name == $CLUSTERNAME) | .labels | ."{{ .Values.labelDomain }}/cluster_name"') - if [ $CLUSTERREALM != "platform" ]; then - echo "Skipping non-platform cluster" $FULLCLUSTERNAME - - continue - fi - - if [ $CLUSTERENVIRONMENT != "${local.workspace.environment_purpose}" ]; then - echo "Skipping non-${local.workspace.environment_purpose} cluster" $FULLCLUSTERNAME + if [ $CLUSTERENVIRONMENT != "{{ .Values.targetEnvironment }}" ]; then + echo "Skipping non-{{ .Values.targetEnvironment }} cluster" $FULLCLUSTERNAME continue fi