Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: event-reporter codefresh cert support #78

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion charts/argo-cd/templates/event-reporter/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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_PATH
value: /app/config/codefresh-tls-certs/{{ $key }}
{{- end }}
# todo: clean up
- name: EVENT_REPORTER_INSECURE
valueFrom:
Expand Down Expand Up @@ -218,7 +224,7 @@ spec:
successThreshold: {{ .Values.eventReporter.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.eventReporter.readinessProbe.failureThreshold }}
resources:
{{- toYaml .Values.eventReporter.resources | nindent 10 }}
{{- toYaml .Values.eventReporter.resources | nindent 12 }}
{{- with .Values.eventReporter.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 10 }}
Expand All @@ -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
Expand Down Expand Up @@ -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: { }
Expand Down