From 0e418d3950295e63ce90e4e99f3d8e1206ff9f5d Mon Sep 17 00:00:00 2001 From: Gokhan Sari Date: Thu, 3 Oct 2024 18:15:38 +0300 Subject: [PATCH] Add an initContainer to listmonk's installation --- charts/listmonk/Chart.yaml | 2 +- charts/listmonk/README.md | 8 ++++---- .../templates/deployment-listmonk.yaml | 19 +++++++++++++------ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/charts/listmonk/Chart.yaml b/charts/listmonk/Chart.yaml index f241f55..e3a5876 100644 --- a/charts/listmonk/Chart.yaml +++ b/charts/listmonk/Chart.yaml @@ -3,4 +3,4 @@ appVersion: "3.0.0" name: listmonk description: High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. type: application -version: 0.1.2 +version: 0.2.0 diff --git a/charts/listmonk/README.md b/charts/listmonk/README.md index cc29377..230bc91 100644 --- a/charts/listmonk/README.md +++ b/charts/listmonk/README.md @@ -1,19 +1,19 @@ # listmonk -![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square) +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square) High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. ## Install ```shell -$ helm upgrade \ +$ helm upgrade listmonk listmonk \ --create-namespace \ - --install listmonk listmonk \ + --install \ --namespace listmonk \ --repo https://th0th.github.io/helm-charts \ --values values.yaml \ - --version 0.1.0 + --version 0.2.0 ``` ## Uninstall diff --git a/charts/listmonk/templates/deployment-listmonk.yaml b/charts/listmonk/templates/deployment-listmonk.yaml index e59ed3b..6f9948a 100644 --- a/charts/listmonk/templates/deployment-listmonk.yaml +++ b/charts/listmonk/templates/deployment-listmonk.yaml @@ -17,17 +17,24 @@ spec: {{- include "listmonk.selectorLabels" . | nindent 8 }} spec: containers: - - command: - - ./listmonk - - --idempotent - - --install - - --yes - image: {{ .Values.listmonk.image.repository }}:{{ .Values.listmonk.image.tag }} + - image: {{ .Values.listmonk.image.repository }}:{{ .Values.listmonk.image.tag }} name: listmonk volumeMounts: - mountPath: /listmonk/config.toml name: config subPath: config.toml + initContainers: + - name: init + image: {{ .Values.listmonk.image.repository }}:{{ .Values.listmonk.image.tag }} + command: + - ./listmonk + - --install + - --upgrade + - --yes + volumeMounts: + - mountPath: /listmonk/config.toml + name: config + subPath: config.toml volumes: - configMap: name: {{ include "listmonk.fullname" . }}-listmonk