From 669f9354b9023b236eeaa943c35bc87ee9179a0d Mon Sep 17 00:00:00 2001 From: Marco Kilchhofer Date: Sun, 17 Oct 2021 15:09:19 +0200 Subject: [PATCH] chore(argocd-applicationset): Don't exclude chart anymore Signed-off-by: Marco Kilchhofer --- .github/configs/ct-install.yaml | 3 +-- .github/workflows/lint-and-test.yml | 8 ++++++++ charts/argocd-applicationset/README.md | 2 +- charts/argocd-applicationset/ci/default-values.yaml | 5 +++++ .../argocd-applicationset/ci/leader-election-values.yaml | 5 +++++ charts/argocd-applicationset/templates/deployment.yaml | 2 +- charts/argocd-applicationset/values.yaml | 4 ++-- 7 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/configs/ct-install.yaml b/.github/configs/ct-install.yaml index e991d382..f2b9dc9e 100644 --- a/.github/configs/ct-install.yaml +++ b/.github/configs/ct-install.yaml @@ -15,5 +15,4 @@ validate-chart-schema: false validate-maintainers: true validate-yaml: true exclude-deprecated: true -excluded-charts: - - "argocd-applicationset" +excluded-charts: [] diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index 2de22a8b..3cc795ee 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -40,6 +40,14 @@ jobs: uses: helm/kind-action@v1.2.0 if: steps.list-changed.outputs.changed == 'true' + - name: Deploy latest ArgoCD CRDs when testing ArgoCD extensions + if: | + contains(steps.list-changed.outputs.changed_charts, 'argocd-applicationset') || + contains(steps.list-changed.outputs.changed_charts, 'argocd-image-updater') || + contains(steps.list-changed.outputs.changed_charts, 'argocd-notifications') + run: | + kubectl apply -f charts/argo-cd/crds + - name: Run chart-testing (install) run: ct install --config ./.github/configs/ct-install.yaml if: steps.list-changed.outputs.changed == 'true' diff --git a/charts/argocd-applicationset/README.md b/charts/argocd-applicationset/README.md index 506880a6..a89d9f6f 100644 --- a/charts/argocd-applicationset/README.md +++ b/charts/argocd-applicationset/README.md @@ -62,7 +62,7 @@ kubectl apply -k https://github.com/argoproj-labs/applicationset.git/manifests/c | args.dryRun | bool | `false` | Enable dry run mode | | args.enableLeaderElection | bool | `false` | The default leader election setting | | args.metricsAddr | string | `":8080"` | The default metric address | -| args.namespace | string | `"argocd"` | The default Argo CD repo namespace | +| args.namespace | string | `""` | Namespace where ArgoCD is deployed to (defaults to .Release.Namespace) | | args.policy | string | `"sync"` | How application is synced between the generator and the cluster | | args.probeBindAddr | string | `":8081"` | The default health check port | | extraArgs | list | `[]` | List of extra cli args to add | diff --git a/charts/argocd-applicationset/ci/default-values.yaml b/charts/argocd-applicationset/ci/default-values.yaml index 507f1e54..adb55437 100644 --- a/charts/argocd-applicationset/ci/default-values.yaml +++ b/charts/argocd-applicationset/ci/default-values.yaml @@ -1 +1,6 @@ # Test with default values + +# Disable mounts of ArgoCD related ConfigMaps as ArgoCD isn't installed during chart testing +mountSSHKnownHostsVolume: false +mountTLSCertsVolume: false +mountGPGKeysVolume: false diff --git a/charts/argocd-applicationset/ci/leader-election-values.yaml b/charts/argocd-applicationset/ci/leader-election-values.yaml index 39ec3078..8baa26dc 100644 --- a/charts/argocd-applicationset/ci/leader-election-values.yaml +++ b/charts/argocd-applicationset/ci/leader-election-values.yaml @@ -2,3 +2,8 @@ args: enableLeaderElection: true replicaCount: 3 + +# Disable mounts of ArgoCD related ConfigMaps as ArgoCD isn't installed during chart testing +mountSSHKnownHostsVolume: false +mountTLSCertsVolume: false +mountGPGKeysVolume: false diff --git a/charts/argocd-applicationset/templates/deployment.yaml b/charts/argocd-applicationset/templates/deployment.yaml index c0527562..281882b6 100644 --- a/charts/argocd-applicationset/templates/deployment.yaml +++ b/charts/argocd-applicationset/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: {{- if or (gt ( .Values.replicaCount | int64) 1) .Values.args.enableLeaderElection }} - --enable-leader-election=true {{- end }} - - --namespace={{ .Values.args.namespace }} + - --namespace={{ .Values.args.namespace | default .Release.Namespace }} - --argocd-repo-server={{ .Values.args.argocdRepoServer }} - --policy={{ .Values.args.policy }} - --debug={{ .Values.args.debug }} diff --git a/charts/argocd-applicationset/values.yaml b/charts/argocd-applicationset/values.yaml index fd5a50d5..b65716a9 100644 --- a/charts/argocd-applicationset/values.yaml +++ b/charts/argocd-applicationset/values.yaml @@ -20,8 +20,8 @@ args: probeBindAddr: :8081 # -- The default leader election setting enableLeaderElection: false - # -- The default Argo CD repo namespace - namespace: argocd + # -- Namespace where ArgoCD is deployed to (defaults to .Release.Namespace) + namespace: "" # -- The default Argo CD repo server address argocdRepoServer: argocd-repo-server:8081 # -- How application is synced between the generator and the cluster