From bf9d8c8e70ce73f425c8e835520565fa6d559c45 Mon Sep 17 00:00:00 2001
From: Denys Melnyk <denis.melnyk@octopus.com>
Date: Thu, 5 Sep 2024 17:22:38 +0300
Subject: [PATCH] [repo server] make cf token required when version reporting
 is enabled

---
 charts/argo-cd/Chart.yaml                                   | 2 +-
 charts/argo-cd/templates/argocd-repo-server/deployment.yaml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml
index 14e8ac120..79ecb785d 100644
--- a/charts/argo-cd/Chart.yaml
+++ b/charts/argo-cd/Chart.yaml
@@ -3,7 +3,7 @@ appVersion: v2.11-2024.8.19-6be897266
 kubeVersion: ">=1.23.0-0"
 description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
 name: argo-cd
-version: 6.11.1-7-cap-2.11-2024.8.19-6be897266
+version: 6.11.1-8-cap-2.11-repo-server-cftoken-fix
 home: https://github.com/argoproj/argo-helm
 icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
 sources:
diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml
index 3e5e6dfc7..1715a8557 100755
--- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml
+++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml
@@ -293,7 +293,7 @@ spec:
               secretKeyRef:
                 key: token
                 name: codefresh-token
-                optional: true
+                optional: {{ not .Values.applicationVersioning.enabled }}
           {{- if .Values.repoServer.useEphemeralHelmWorkingDir }}
           - name: HELM_CACHE_HOME
             value: /helm-working-dir