From 50a145e07d80c99ce0b785880dc4fc0f9433bb56 Mon Sep 17 00:00:00 2001 From: Jan Husak Date: Wed, 9 Apr 2025 15:41:07 +0200 Subject: [PATCH] json experiment --- apps/argo-cd/apps/applicationset.yaml | 2 +- apps/argo-cd/argocd.json | 41 +++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 apps/argo-cd/argocd.json diff --git a/apps/argo-cd/apps/applicationset.yaml b/apps/argo-cd/apps/applicationset.yaml index 6b8d868..fd61ccd 100644 --- a/apps/argo-cd/apps/applicationset.yaml +++ b/apps/argo-cd/apps/applicationset.yaml @@ -43,7 +43,7 @@ spec: # As a side effect, it also allows access to previously defined values, like '.values.stageName' elements: # The selector also had troubles with booleans vs. strings, hence the 'yes' and not 'true' - - enabled: '{{ dig "stages" .values.stageName "enabled" false . | ternary "yes" "" }}' + - enabled: '{{ dig "clusters" .values.stageName .values.clusterName "enabled" false . | ternary "yes" "" }}' appName: "{{ .path.basename }}" selector: matchLabels: diff --git a/apps/argo-cd/argocd.json b/apps/argo-cd/argocd.json new file mode 100644 index 0000000..cd47c80 --- /dev/null +++ b/apps/argo-cd/argocd.json @@ -0,0 +1,41 @@ +{ + "apiVersion": "ysoft.com/v1", + "source": { + "repoURL": "https://github.com/ysoftdevs/argo-poc.git", + "path": "helm-repo/traefik/traefik-35.0.0", + "chartRevision": "traefik", + "valuesRevision": "traefik", + "chart": "" + }, + "destination": { + "namespace": "traefik" + }, + "syncPolicy": { + "syncOptions": { + "ServerSideApply": true, + "CreateNamespace": true + } + }, + "valueFiles": [ + "values/registry/%provider%-%stage%-values.yaml", + "values/app-version/%stage%-values.yaml" + ], + "clusters": { + "dev": { + "control-plane-dev": { + "enabled": true + }, + "ohio": { + "enabled": false + } + }, + "prod": { + "control-plane": { + "enabled": true + }, + "ireland": { + "enabled": false + } + } + } +} \ No newline at end of file