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

Several improvements to the chart #129

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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 }}
18 changes: 18 additions & 0 deletions charts/s3gw/tests/validation_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ tests:
ui.enabled: false
useExistingSecret: false
useCertManager: false
tls.publicDomain.crt: foo
tls.publicDomain.key: bar
tls.privateDomain.crt: abc
tls.privateDomain.key: xyz
asserts:
# An empty document counts as having failed templating. But in case of
# chart-validation.yaml we expect the document to be empty if none of the
Expand Down Expand Up @@ -66,6 +70,12 @@ tests:
publicDomain: "example.com"
useExistingSecret: false
useCertManager: false
tls.publicDomain.crt: foo
tls.publicDomain.key: bar
tls.privateDomain.crt: abc
tls.privateDomain.key: xyz
tls.ui.publicDomain.crt: aaa
tls.ui.publicDomain.key: bbb
asserts:

- hasDocuments:
Expand All @@ -78,6 +88,10 @@ tests:
publicDomain: example.com
useExistingSecret: false
useCertManager: false
tls.publicDomain.crt: foo
tls.publicDomain.key: bar
tls.privateDomain.crt: abc
tls.privateDomain.key: xyz
asserts:

- hasDocuments:
Expand Down Expand Up @@ -166,6 +180,10 @@ tests:
publicDomain: "example.com"
ui.enabled: false
useExistingSecret: false
tls.publicDomain.crt: foo
tls.publicDomain.key: bar
tls.privateDomain.crt: abc
tls.privateDomain.key: xyz
asserts:

- hasDocuments:
Expand Down
Loading