Skip to content

Commit

Permalink
Several improvements to the chart
Browse files Browse the repository at this point in the history
- Append the https:// protocol to the displayed URLs. Since the chart always installs the TLS certificates, we can restrict the output URLs to HTTPS.
- Add more chart validation tests.

Signed-off-by: Volker Theile <vtheile@suse.com>
  • Loading branch information
votdev committed Oct 27, 2023
1 parent 61b2b80 commit 19d218c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/s3gw/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Thank you for installing {{ .Chart.Name }} {{ printf "v%s" .Chart.Version }}

The S3 endpoint is available at:

{{ printf "%s.%s" (include "s3gw.serviceName" .) .Values.publicDomain | indent 4 }}
{{ printf "https://%s.%s" (include "s3gw.serviceName" .) .Values.publicDomain | indent 4 }}
{{ if .Values.ui.enabled}}
and the web interface is available at:

{{ printf "%s.%s" (include "s3gw.uiServiceName" .) .Values.ui.publicDomain | indent 4 }}
{{ printf "https://%s.%s" (include "s3gw.uiServiceName" .) .Values.ui.publicDomain | indent 4 }}
{{- end }}
{{ if and (not .Values.useExistingSecret) (empty .Values.accessKey) }}
An access key has been generated: {{ include "s3gw.defaultAccessKey" . | quote }}
Expand Down
12 changes: 12 additions & 0 deletions charts/s3gw/templates/chart-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,15 @@
{{- end }}
{{- end }}
{{- end }}

{{- if (and .Values.ingress.enabled (not .Values.useCertManager)) }}
{{- if (or (empty .Values.tls.publicDomain.crt) (empty .Values.tls.publicDomain.key)) }}
{{- fail "Please provide valid values for `.Values.tls.publicDomain`" }}
{{- end }}
{{- if (or (empty .Values.tls.privateDomain.crt) (empty .Values.tls.privateDomain.key)) }}
{{- fail "Please provide valid values for `.Values.tls.privateDomain`" }}
{{- end }}
{{- if (and .Values.ui.enabled (or (empty .Values.tls.ui.publicDomain.crt) (empty .Values.tls.ui.publicDomain.key))) }}
{{- fail "Please provide valid values for `.Values.tls.ui.publicDomain`" }}
{{- end }}
{{- end }}

0 comments on commit 19d218c

Please sign in to comment.