diff --git a/charts/library-chart/Chart.yaml b/charts/library-chart/Chart.yaml index 74169d66..4aff5f6a 100644 --- a/charts/library-chart/Chart.yaml +++ b/charts/library-chart/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 name: library-chart -version: 1.5.27 +version: 1.5.28 type: library diff --git a/charts/library-chart/templates/_secret.tpl b/charts/library-chart/templates/_secret.tpl index 87d710f3..5176a5db 100644 --- a/charts/library-chart/templates/_secret.tpl +++ b/charts/library-chart/templates/_secret.tpl @@ -441,4 +441,35 @@ stringData: {{- end }} {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} + + +{{/* Name of the CA certificates secret */}} +{{- define "library-chart.secretNameCacerts" -}} +{{- if .Values.certificates }} +{{- $name:= (printf "%s-secretcacerts" (include "library-chart.fullname" .) ) }} +{{- default $name .Values.certificates.secretName }} +{{- else }} +{{- default "default" .Values.certificates.secretName }} +{{- end }} +{{- end }} + +{{/* Template to generate a secret for CA certificates */}} +{{- define "library-chart.secretCacerts" -}} +{{- if and .Values.certificates .Values.certificates.cacerts }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "library-chart.secretNameCacerts" . }} + labels: + {{- include "library-chart.labels" . | nindent 4 }} +type: Opaque +stringData: + {{- if regexMatch "^https?://" .Values.certificates.cacerts }} + ca-certs.url: {{ .Values.certificates.cacerts }} + {{- else }} + ca.pem: | + {{- .Values.certificates.cacerts | nindent 4 }} + {{- end }} +{{- end }} +{{- end }} diff --git a/charts/library-chart/values.yaml b/charts/library-chart/values.yaml index 8b137891..e69de29b 100644 --- a/charts/library-chart/values.yaml +++ b/charts/library-chart/values.yaml @@ -1 +0,0 @@ -