diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index d56c55cd..b40905ea 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -3,7 +3,7 @@ appVersion: v2.11-2024.7.30-a31bf96bb 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-5-cap-2.11-2024.7.30-a31bf96bb +version: 6.11.1-6-cap-2.11-2024.7.30-a31bf96bb 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/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl index acc8c219..cc2910b5 100644 --- a/charts/argo-cd/templates/_helpers.tpl +++ b/charts/argo-cd/templates/_helpers.tpl @@ -262,3 +262,14 @@ Create the name of the Argo CD server service account to use {{ default "default" .Values.eventReporter.serviceAccount.name }} {{- end -}} {{- end -}} + +{{/* +Helper template to set argocd server url in event reporter +*/}} +{{- define "argo-cd.eventReporter.argocd-server-adress" -}} + {{- $port := .Values.server.service.servicePortHttps }} + {{- if (index .Values.configs.params "server.insecure") }} + {{- $port = .Values.server.service.servicePortHttp }} + {{- end }} + {{- printf "%s:%v" (include "argo-cd.server.fullname" .) $port }} +{{- end -}} diff --git a/charts/argo-cd/templates/event-reporter/statefulset.yaml b/charts/argo-cd/templates/event-reporter/statefulset.yaml index 11bc9c01..f51cb53b 100644 --- a/charts/argo-cd/templates/event-reporter/statefulset.yaml +++ b/charts/argo-cd/templates/event-reporter/statefulset.yaml @@ -71,6 +71,8 @@ spec: {{- with (concat .Values.global.env .Values.eventReporter.env) }} {{- toYaml . | nindent 10 }} {{- end }} + - name: EVENT_REPORTER_APPLICATION_SERVER + value: {{ include "argo-cd.eventReporter.argocd-server-adress" . }} - name: EVENT_REPORTER_REPLICAS value: {{ .Values.eventReporter.replicas | quote }} - name: ARGOCD_APPLICATION_NAMESPACES