From 3950fd79853833c14f9fd15fbaffacf1a5cab269 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 12 Jun 2024 13:57:56 +0300 Subject: [PATCH] event-reporter / statefulset: added codefresh cert secret volumes --- .../templates/event-reporter/statefulset.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/charts/argo-cd/templates/event-reporter/statefulset.yaml b/charts/argo-cd/templates/event-reporter/statefulset.yaml index 811446c09..6f0d6abf4 100644 --- a/charts/argo-cd/templates/event-reporter/statefulset.yaml +++ b/charts/argo-cd/templates/event-reporter/statefulset.yaml @@ -101,6 +101,12 @@ spec: secretKeyRef: key: token name: codefresh-token + {{ - if or .Values.global.codefresh.tls.caCerts.secret.create .Values.global.codefresh.tls.caCerts.secretKeyRef }} + {{ - $name := .Values.global.codefresh.tls.caCerts.secret.create | ternary "codefresh-tls-certs" .Values.global.codefresh.tls.caCerts.secretKeyRef.name }} + {{ - $key := .Values.global.codefresh.tls.caCerts.secret.create | ternary (default "ca-bundle.crt" .Values.global.codefresh.tls.caCerts.secret.key) .Values.global.codefresh.tls.caCerts.secretKeyRef.key }} + - name: CODEFRESH_SSL_CERT_FILE + value: /app/config/codefresh-tls-certs/{{ $key }} + {{ - end }} # todo: clean up - name: EVENT_REPORTER_INSECURE valueFrom: @@ -227,6 +233,11 @@ spec: {{- with .Values.eventReporter.volumeMounts }} {{- toYaml . | nindent 8 }} {{- end }} + {{- if or .Values.global.codefresh.tls.caCerts.secret.create .Values.global.codefresh.tls.caCerts.secretKeyRef}} + - name: codefresh-tls-certs + mountPath: /app/config/codefresh-tls-certs + readOnly: true + {{- end }} - name: argocd-repo-server-tls mountPath: /app/config/server/tls - mountPath: /tmp @@ -265,6 +276,13 @@ spec: {{- with .Values.eventReporter.volumes }} {{- toYaml . | nindent 6 }} {{- end }} + { { - if or .Values.global.codefresh.tls.caCerts.secret.create .Values.global.codefresh.tls.caCerts.secretKeyRef } } + - name: codefresh-tls-certs + secret: + secretName: { { .Values.global.codefresh.tls.caCerts.secret.create | ternary "codefresh-tls-certs" .Values.global.codefresh.tls.caCerts.secretKeyRef.name } } + defaultMode: 420 + optional: true + { { - end } } - emptyDir: { } name: plugins-home - emptyDir: { }