diff --git a/charts/mailpit/Chart.lock b/charts/mailpit/Chart.lock index 08a9192..5ba3136 100644 --- a/charts/mailpit/Chart.lock +++ b/charts/mailpit/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:8ab32897fda14bd026e41d2e532e07b1ea04a31588031cd50aa06d31748d858a -generated: "2023-08-21T11:07:54.622799+02:00" + version: 2.10.1 +digest: sha256:3f8cae6c1c6625ed483dbccffae6e274006e5bb3d79b2f1abba15c765d2b6a04 +generated: "2023-09-09T11:15:46.800109159+02:00" diff --git a/charts/mailpit/Chart.yaml b/charts/mailpit/Chart.yaml index 1112596..66dafa8 100644 --- a/charts/mailpit/Chart.yaml +++ b/charts/mailpit/Chart.yaml @@ -1,8 +1,9 @@ apiVersion: v2 name: mailpit description: An email and SMTP testing tool with API for developers +icon: https://raw.githubusercontent.com/axllent/mailpit/develop/server/ui/mailpit.svg type: application -version: 0.5.3 +version: 0.6.0 appVersion: 1.8.2 dependencies: - name: common diff --git a/charts/mailpit/ci/auth-values.yaml b/charts/mailpit/ci/auth-values.yaml new file mode 100644 index 0000000..e6b3117 --- /dev/null +++ b/charts/mailpit/ci/auth-values.yaml @@ -0,0 +1,9 @@ +mailpit: + ui: + authFile: + enabled: true + htpasswd: toto + smtp: + authFile: + enabled: true + htpasswd: tutu diff --git a/charts/mailpit/ci/default-values.yaml b/charts/mailpit/ci/default-values.yaml new file mode 100644 index 0000000..e69de29 diff --git a/charts/mailpit/ci/ingress-values.yaml b/charts/mailpit/ci/ingress-values.yaml new file mode 100644 index 0000000..f6ccc62 --- /dev/null +++ b/charts/mailpit/ci/ingress-values.yaml @@ -0,0 +1,2 @@ +ingress: + enabled: true diff --git a/charts/mailpit/ci/persistence-values.yaml b/charts/mailpit/ci/persistence-values.yaml new file mode 100644 index 0000000..a434bf0 --- /dev/null +++ b/charts/mailpit/ci/persistence-values.yaml @@ -0,0 +1,2 @@ +persistence: + enabled: true diff --git a/charts/mailpit/ci/tls-values.yaml b/charts/mailpit/ci/tls-values.yaml new file mode 100644 index 0000000..eaa4b3f --- /dev/null +++ b/charts/mailpit/ci/tls-values.yaml @@ -0,0 +1,9 @@ +mailpit: + ui: + tls: + enabled: true + secretName: ui-tls + smtp: + tls: + enabled: true + secretName: smtp-tls diff --git a/charts/mailpit/templates/deployment.yaml b/charts/mailpit/templates/deployment.yaml index 5db7745..b5f9d71 100644 --- a/charts/mailpit/templates/deployment.yaml +++ b/charts/mailpit/templates/deployment.yaml @@ -3,10 +3,7 @@ kind: Deployment metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- with .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- with .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} {{- end }} @@ -18,14 +15,12 @@ spec: {{- else if .Values.updateStrategy }} strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) | fromYaml }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- with .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} {{- if or .Values.podAnnotations (include "mailpit.hasSecret" .) }} annotations: {{- with .Values.podAnnotations }} @@ -118,7 +113,7 @@ spec: {{- include "common.tplvalues.render" ( dict "value" . "context" $) | nindent 8 }} {{- end }} volumes: - {{- if or .Values.mailpit.ui.authFile.enabled .Values.mailpit.smtp.authFile.enabled .Values.mailpit.ui.tls.secretName .Values.mailpit.smtp.tls.secretName .Values.mailpit.relay.enabled }} + {{- if or .Values.mailpit.ui.authFile.enabled .Values.mailpit.smtp.authFile.enabled .Values.mailpit.ui.tls.enabled .Values.mailpit.smtp.tls.enabled .Values.mailpit.relay.enabled }} - name: etc projected: sources: @@ -142,7 +137,7 @@ spec: {{- end }} {{- if .Values.mailpit.ui.tls.enabled }} - secret: - name: {{ .Values.mailpit.ui.tls.secretName }} + name: {{ .Values.mailpit.ui.tls.secretName | required "mailpit.ui.tls.secretName required when tls is enabled" }} items: - key: tls.crt path: ui.crt @@ -151,7 +146,7 @@ spec: {{- end }} {{- if .Values.mailpit.smtp.tls.enabled }} - secret: - name: {{ .Values.mailpit.smtp.tls.secretName }} + name: {{ .Values.mailpit.smtp.tls.secretName | required "mailpit.smtp.tls.secretName required when tls is enabled" }} items: - key: tls.crt path: smtp.crt diff --git a/charts/mailpit/templates/http-service.yaml b/charts/mailpit/templates/http-service.yaml index 06f6055..7fa16d2 100644 --- a/charts/mailpit/templates/http-service.yaml +++ b/charts/mailpit/templates/http-service.yaml @@ -3,18 +3,9 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }}-http namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- with .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.service.http.annotations }} - annotations: - {{- with .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} - {{- with .Values.service.http.annotations }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- with include "common.tplvalues.merge" ( dict "values" (list .Values.service.http.annotations .Values.commonAnnotations) "context" . ) | fromYaml }} + annotations: {{- . | toYaml | nindent 4 }} {{- end }} spec: type: {{ .Values.service.http.type }} @@ -25,4 +16,5 @@ spec: nodePort: {{ .Values.service.http.nodePort }} {{- end }} targetPort: http - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) | fromYaml }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} diff --git a/charts/mailpit/templates/ingress.yaml b/charts/mailpit/templates/ingress.yaml index 81fcffa..977d631 100644 --- a/charts/mailpit/templates/ingress.yaml +++ b/charts/mailpit/templates/ingress.yaml @@ -4,18 +4,9 @@ kind: Ingress metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- with .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.ingress.annotations }} - annotations: - {{- with .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} - {{- with .Values.ingress.annotations }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- with include "common.tplvalues.merge" ( dict "values" (list .Values.ingress.annotations .Values.commonAnnotations) "context" . ) | fromYaml }} + annotations: {{- . | toYaml | nindent 4 }} {{- end }} spec: {{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} diff --git a/charts/mailpit/templates/persistentvolumeclaim.yaml b/charts/mailpit/templates/persistentvolumeclaim.yaml index eaa531b..ca789db 100644 --- a/charts/mailpit/templates/persistentvolumeclaim.yaml +++ b/charts/mailpit/templates/persistentvolumeclaim.yaml @@ -4,18 +4,9 @@ apiVersion: v1 metadata: name: {{ include "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- with .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.persistence.annotations }} - annotations: - {{- with .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} - {{- with .Values.persistence.annotations }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- with include "common.tplvalues.merge" ( dict "values" (list .Values.persistence.annotations .Values.commonAnnotations) "context" . ) | fromYaml }} + annotations: {{- . | toYaml | nindent 4 }} {{- end }} spec: accessModes: {{ .Values.persistence.accessModes | toYaml | nindent 4 }} diff --git a/charts/mailpit/templates/secret.yaml b/charts/mailpit/templates/secret.yaml index 7c89eb2..7d18e95 100644 --- a/charts/mailpit/templates/secret.yaml +++ b/charts/mailpit/templates/secret.yaml @@ -4,10 +4,7 @@ kind: Secret metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- with .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- with .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/mailpit/templates/smtp-service.yaml b/charts/mailpit/templates/smtp-service.yaml index 5bff391..1d39bf1 100644 --- a/charts/mailpit/templates/smtp-service.yaml +++ b/charts/mailpit/templates/smtp-service.yaml @@ -3,18 +3,9 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }}-smtp namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- with .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.service.smtp.annotations }} - annotations: - {{- with .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} - {{- with .Values.service.smtp.annotations }} - {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- with include "common.tplvalues.merge" ( dict "values" (list .Values.service.smtp.annotations .Values.commonAnnotations) "context" . ) | fromYaml }} + annotations: {{- . | toYaml | nindent 4 }} {{- end }} spec: type: {{ .Values.service.smtp.type }} @@ -25,4 +16,5 @@ spec: nodePort: {{ .Values.service.smtp.nodePort }} {{- end }} targetPort: smtp - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" (list .Values.podLabels .Values.commonLabels) "context" . ) | fromYaml }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}