Skip to content

Commit

Permalink
[stable/prestashop] Avoid setting SMTP env. variables when the corres…
Browse files Browse the repository at this point in the history
…poding values are not set (helm#10957)

Signed-off-by: juan131 <juan@bitnami.com>
  • Loading branch information
juan131 authored and k8s-ci-robot committed Jan 29, 2019
1 parent d7c49ed commit a4c22f9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stable/prestashop/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: prestashop
version: 6.1.1
version: 6.1.2
appVersion: 1.7.5-0
description: A popular open source ecommerce solution. Professional tools are easily accessible to increase online sales including instant guest checkout, abandoned cart reminders and automated Email marketing.
keywords:
Expand Down
10 changes: 10 additions & 0 deletions stable/prestashop/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,29 @@ spec:
value: {{ .Values.prestashopFirstName | quote }}
- name: PRESTASHOP_LAST_NAME
value: {{ .Values.prestashopLastName | quote }}
{{- if .Values.smtpHost }}
- name: SMTP_HOST
value: {{ .Values.smtpHost | quote }}
{{- end }}
{{- if .Values.smtpPort }}
- name: SMTP_PORT
value: {{ .Values.smtpPort | quote }}
{{- end }}
{{- if .Values.smtpUser }}
- name: SMTP_USER
value: {{ .Values.smtpUser | quote }}
{{- end }}
{{- if .Values.smtpPassword }}
- name: SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "prestashop.fullname" . }}
key: smtp-password
{{- end }}
{{- if .Values.smtpProtocol }}
- name: SMTP_PROTOCOL
value: {{ .Values.smtpProtocol | quote }}
{{- end }}
ports:
- name: http
containerPort: 80
Expand Down
10 changes: 6 additions & 4 deletions stable/prestashop/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ metadata:
heritage: {{ .Release.Service | quote }}
type: Opaque
data:
{{ if .Values.prestashopPassword }}
{{- if .Values.prestashopPassword }}
prestashop-password: {{ default "" .Values.prestashopPassword | b64enc | quote }}
{{ else }}
{{- else }}
prestashop-password: {{ randAlphaNum 10 | b64enc | quote }}
{{ end }}
smtp-password: {{ default "" .Values.smtpPassword | b64enc | quote }}
{{- end }}
{{- if .Values.smtpPassword }}
smtp-password: {{ .Values.smtpPassword | b64enc | quote }}
{{- end }}

0 comments on commit a4c22f9

Please sign in to comment.