From a3673d99741e2609b56cf56d25fd9025ea448da4 Mon Sep 17 00:00:00 2001 From: Cyril Jouve Date: Mon, 9 Sep 2024 22:10:38 +0200 Subject: [PATCH] [mailpit] bump --- charts/mailpit/Chart.yaml | 2 +- charts/mailpit/README.md | 80 ++++++++++++------------ charts/mailpit/templates/deployment.yaml | 32 +++++----- charts/mailpit/values.yaml | 22 +++---- 4 files changed, 65 insertions(+), 71 deletions(-) diff --git a/charts/mailpit/Chart.yaml b/charts/mailpit/Chart.yaml index e7954bc..66d5803 100644 --- a/charts/mailpit/Chart.yaml +++ b/charts/mailpit/Chart.yaml @@ -4,7 +4,7 @@ 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.18.3 -appVersion: 1.18.7 +appVersion: 1.20.4 dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts diff --git a/charts/mailpit/README.md b/charts/mailpit/README.md index 7be1cfb..76c5429 100644 --- a/charts/mailpit/README.md +++ b/charts/mailpit/README.md @@ -19,47 +19,45 @@ helm install mailpit jouve/mailpit ### Common -| Name | Description | Value | -| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ----------------- | -| `image.registry` | image registry | `docker.io` | -| `image.repository` | image repository | `axllent/mailpit` | -| `image.tag` | image tag (immutable tags are recommended) | `v1.17.1` | -| `image.digest` | image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended) | `""` | -| `image.pullPolicy` | image pull policy | `IfNotPresent` | -| `image.pullSecrets` | image pull secrets | `[]` | -| `image.debug` | Enable image debug mode | `false` | -| `commonLabels` | Labels to add to all deployed objects | `{}` | -| `podLabels` | Extra labels for pods | `{}` | -| `updateStrategy.type` | statefulset strategy type | `RollingUpdate` | -| `podSecurityContext` | SecurityContext for pods | `{}` | -| `containerSecurityContext` | SecurityContext for pods | `{}` | -| `replicaCount` | Number of replicas to deploy | `1` | -| `resources.limits.cpu` | The resources limits for the containers | `100m` | -| `resources.limits.memory` | The resources limits for the containers | `64Mi` | -| `resources.requests.cpu` | The requested resources for the containers | `5m` | -| `resources.requests.memory` | The requested resources for the containers | `4Mi` | -| `affinity` | Pod affinity | `{}` | -| `args` | Override default container args (useful when using custom images) | `[]` | -| `extraEnvVars` | Array with extra environment variables to add to nodes | `[]` | -| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars for containers | `""` | -| `livenessProbe` | Enables the livenessProbe for mailpit | `{}` | -| `readinessProbe` | Enables the readinessProbe for mailpit | `{}` | -| `nodeSelector` | Node labels for pod assignment | `{}` | -| `tolerations` | expects input structure as per specification https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#toleration-v1-core | `[]` | -| `mailpit.webroot` | Set the webroot for web UI & API | `/` | -| `mailpit.ui.authFile.enabled` | Adding basic authentication to web UI | `false` | -| `mailpit.ui.authFile.htpasswd` | htpasswd content | `""` | -| `mailpit.ui.authFile.existingSecret` | Secret containing htpasswd content | `{}` | -| `mailpit.ui.tls.enabled` | Enable tls for web UI | `false` | -| `mailpit.ui.tls.secretName` | tls secret for web UI | `""` | -| `mailpit.smtp.authFile.enabled` | Adding SMTP authentication | `false` | -| `mailpit.smtp.authFile.htpasswd` | htpasswd content | `""` | -| `mailpit.smtp.authFile.existingSecret` | Secret containing htpasswd content | `{}` | -| `mailpit.smtp.tls.enabled` | Enable tls for SMTP | `false` | -| `mailpit.smtp.tls.secretName` | tls secret for SMTP | `""` | -| `mailpit.relay.enabled` | enable SMTP Relay configuration | `false` | -| `mailpit.relay.config` | Mailpit SMTP relay configuration | `{}` | -| `mailpit.relay.relayAll` | Relay all messages to relay | `false` | +| Name | Description | Value | +| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| `image.registry` | image registry | `docker.io` | +| `image.repository` | image repository | `axllent/mailpit` | +| `image.tag` | image tag (immutable tags are recommended) | `v1.20.4` | +| `image.digest` | image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended) | `""` | +| `image.pullPolicy` | image pull policy | `IfNotPresent` | +| `image.pullSecrets` | image pull secrets | `[]` | +| `image.debug` | Enable image debug mode | `false` | +| `commonLabels` | Labels to add to all deployed objects | `{}` | +| `podLabels` | Extra labels for pods | `{}` | +| `updateStrategy.type` | statefulset strategy type | `RollingUpdate` | +| `podSecurityContext` | SecurityContext for pods | `{}` | +| `containerSecurityContext` | SecurityContext for pods | `{}` | +| `replicaCount` | Number of replicas to deploy | `1` | +| `resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `nano` | +| `resources` | The resources for the containers | `{}` | +| `affinity` | Pod affinity | `{}` | +| `args` | Override default container args (useful when using custom images) | `[]` | +| `extraEnvVars` | Array with extra environment variables to add to nodes | `[]` | +| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars for containers | `""` | +| `livenessProbe` | Enables the livenessProbe for mailpit | `{}` | +| `readinessProbe` | Enables the readinessProbe for mailpit | `{}` | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | expects input structure as per specification https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#toleration-v1-core | `[]` | +| `mailpit.webroot` | Set the webroot for web UI & API | `/` | +| `mailpit.ui.authFile.enabled` | Adding basic authentication to web UI | `false` | +| `mailpit.ui.authFile.htpasswd` | htpasswd content | `""` | +| `mailpit.ui.authFile.existingSecret` | Secret containing htpasswd content | `{}` | +| `mailpit.ui.tls.enabled` | Enable tls for web UI | `false` | +| `mailpit.ui.tls.secretName` | tls secret for web UI | `""` | +| `mailpit.smtp.authFile.enabled` | Adding SMTP authentication | `false` | +| `mailpit.smtp.authFile.htpasswd` | htpasswd content | `""` | +| `mailpit.smtp.authFile.existingSecret` | Secret containing htpasswd content | `{}` | +| `mailpit.smtp.tls.enabled` | Enable tls for SMTP | `false` | +| `mailpit.smtp.tls.secretName` | tls secret for SMTP | `""` | +| `mailpit.relay.enabled` | enable SMTP Relay configuration | `false` | +| `mailpit.relay.config` | Mailpit SMTP relay configuration | `{}` | +| `mailpit.relay.relayAll` | Relay all messages to relay | `false` | ### Traffic Exposure Parameters diff --git a/charts/mailpit/templates/deployment.yaml b/charts/mailpit/templates/deployment.yaml index 95a0b71..9dee48c 100644 --- a/charts/mailpit/templates/deployment.yaml +++ b/charts/mailpit/templates/deployment.yaml @@ -33,8 +33,8 @@ spec: spec: automountServiceAccountToken: false {{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image) "context" $) | nindent 6 }} - {{- with .Values.podSecurityContext }} - securityContext: {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} + {{- if .Values.podSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.podSecurityContext "context" $) | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} @@ -43,8 +43,8 @@ spec: - name: mailpit image: {{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }} imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- with .Values.containerSecurityContext }} - securityContext: {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 12 }} + {{- if .Values.containerSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) | nindent 12 }} {{- end }} args: - --db-file @@ -90,15 +90,17 @@ spec: {{- with .Values.extraEnvVars }} env: {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 10 }} {{- end }} - {{- if .Values.extraEnvVarsSecret }} + {{- with .Values.extraEnvVarsSecret }} envFrom: - {{- with .Values.extraEnvVarsSecret }} - secretRef: name: {{ template "common.tplvalues.render" (dict "value" . "context" $) }} - {{- end }} {{- end }} {{- with .Values.resources }} resources: {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 12 }} + {{- else }} + {{- if ne .Values.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" .Values.resourcesPreset) | nindent 12 }} + {{- end }} {{- end }} ports: - name: http @@ -111,11 +113,9 @@ spec: path: {{ .Values.mailpit.webroot | trimSuffix "/" }}/livez port: 8025 scheme: HTTP - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + {{- with omit .Values.livenessProbe "enabled" }} + {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 12 }} + {{- end }} {{- end }} {{- if .Values.readinessProbe.enabled }} readinessProbe: @@ -123,11 +123,9 @@ spec: path: {{ .Values.mailpit.webroot | trimSuffix "/" }}/readyz port: 8025 scheme: HTTP - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + {{- with omit .Values.readinessProbe "enabled" }} + {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 12 }} + {{- end }} {{- end }} volumeMounts: - name: data diff --git a/charts/mailpit/values.yaml b/charts/mailpit/values.yaml index 2c44b65..c9671a8 100644 --- a/charts/mailpit/values.yaml +++ b/charts/mailpit/values.yaml @@ -34,7 +34,7 @@ global: image: registry: docker.io repository: axllent/mailpit - tag: v1.18.7 + tag: v1.20.4 digest: "" ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' @@ -77,12 +77,14 @@ updateStrategy: ## ref: https://kubernetes.io/docs/concepts/security/pod-security-standards/ ## podSecurityContext: + enabled: true fsGroup: 1001 ## @param containerSecurityContext [object] SecurityContext for pods ## ref: https://kubernetes.io/docs/concepts/security/pod-security-standards/ ## containerSecurityContext: + enabled: true allowPrivilegeEscalation: false capabilities: drop: @@ -99,19 +101,15 @@ containerSecurityContext: replicaCount: 1 ## resource requests and limits +## ref: http://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +## @param resourcesPreset Set container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). +## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15 +## +resourcesPreset: "nano" ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ -## @param resources.limits.cpu The resources limits for the containers -## @param resources.limits.memory The resources limits for the containers -## @param resources.requests.cpu The requested resources for the containers -## @param resources.requests.memory The requested resources for the containers +## @param resources [object] The resources for the containers ## -resources: - limits: - cpu: 100m - memory: 64Mi - requests: - cpu: 5m - memory: 4Mi +resources: {} ## @param affinity Pod affinity ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity