From 77c98694a9a0ac3971eb4984b70f992a595f8704 Mon Sep 17 00:00:00 2001 From: Gokhan Sari Date: Mon, 4 Nov 2024 19:28:24 +0300 Subject: [PATCH] Release listmonk chart: v0.3.0, app: v4.0.1 --- charts/listmonk/templates/configmap-listmonk.yaml | 4 ++-- charts/listmonk/templates/configmap-postgres.yaml | 4 ++-- charts/listmonk/templates/deployment-listmonk.yaml | 13 ++++++------- charts/listmonk/templates/ingress-listmonk.yaml | 12 ++++++------ charts/listmonk/templates/secret-postgres.yaml | 6 +++--- charts/listmonk/templates/service-listmonk.yaml | 4 ++-- charts/listmonk/templates/service-postgres.yaml | 8 ++++---- charts/listmonk/templates/statefulset-postgres.yaml | 12 ++++++------ 8 files changed, 31 insertions(+), 32 deletions(-) diff --git a/charts/listmonk/templates/configmap-listmonk.yaml b/charts/listmonk/templates/configmap-listmonk.yaml index 7e09b37..6754ba8 100644 --- a/charts/listmonk/templates/configmap-listmonk.yaml +++ b/charts/listmonk/templates/configmap-listmonk.yaml @@ -3,14 +3,14 @@ kind: ConfigMap metadata: name: {{ include "listmonk.fullname" . }}-listmonk labels: - {{- include "listmonk.labels" . | nindent 4 }} + {{ include "listmonk.labels" . | nindent 4 }} data: config.toml: | [app] address = "0.0.0.0:80" [db] - host = "{{- include "listmonk.fullname" .}}-postgres" + host = "{{ include "listmonk.fullname" .}}-postgres" port = 5432 database = "{{ .Values.postgres.database }}" ssl_mode = "disable" diff --git a/charts/listmonk/templates/configmap-postgres.yaml b/charts/listmonk/templates/configmap-postgres.yaml index 61a8d47..cdd656f 100644 --- a/charts/listmonk/templates/configmap-postgres.yaml +++ b/charts/listmonk/templates/configmap-postgres.yaml @@ -3,7 +3,7 @@ kind: ConfigMap metadata: name: {{ include "listmonk.fullname" . }}-postgres labels: - {{- include "listmonk.labels" . | nindent 4 }} + {{ include "listmonk.labels" . | nindent 4 }} data: - DATABASE: "{{ .Values.postgres.database}}" + DATABASE: {{ .Values.postgres.database | quote }} HOST: {{ include "listmonk.postgresHostname" . | quote }} diff --git a/charts/listmonk/templates/deployment-listmonk.yaml b/charts/listmonk/templates/deployment-listmonk.yaml index 5e4a5ec..776b262 100644 --- a/charts/listmonk/templates/deployment-listmonk.yaml +++ b/charts/listmonk/templates/deployment-listmonk.yaml @@ -3,18 +3,18 @@ kind: Deployment metadata: name: {{ include "listmonk.fullname" . }}-listmonk labels: - {{- include "listmonk.labels" . | nindent 4 }} + {{ include "listmonk.labels" . | nindent 4 }} spec: replicas: {{ .Values.listmonk.replicas}} selector: matchLabels: deployment: listmonk - {{- include "listmonk.selectorLabels" . | nindent 6 }} + {{ include "listmonk.selectorLabels" . | nindent 6 }} template: metadata: labels: deployment: listmonk - {{- include "listmonk.selectorLabels" . | nindent 8 }} + {{ include "listmonk.selectorLabels" . | nindent 8 }} spec: containers: - env: @@ -37,10 +37,9 @@ spec: name: init image: {{ .Values.listmonk.image.repository }}:{{ .Values.listmonk.image.tag | default .Chart.AppVersion }} command: - - ./listmonk - - --install - - --upgrade - - --yes + - sh + - -c + - "./listmonk --install --idempotent --yes && ./listmonk --upgrade --yes" volumeMounts: - mountPath: /listmonk/config.toml name: config diff --git a/charts/listmonk/templates/ingress-listmonk.yaml b/charts/listmonk/templates/ingress-listmonk.yaml index bcc3fa3..6b4dd80 100644 --- a/charts/listmonk/templates/ingress-listmonk.yaml +++ b/charts/listmonk/templates/ingress-listmonk.yaml @@ -1,12 +1,12 @@ -{{- if .Values.ingress.enabled }} +{{ if .Values.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "listmonk.fullname" . }}-listmonk labels: - {{- include "listmonk.labels" . | nindent 4 }} + {{ include "listmonk.labels" . | nindent 4 }} annotations: - {{- toYaml .Values.ingress.annotations | nindent 4 }} + {{ toYaml .Values.ingress.annotations | nindent 4 }} spec: rules: - host: {{ .Values.ingress.host}} @@ -14,11 +14,11 @@ spec: paths: - backend: service: - name: '{{ include "listmonk.fullname" . }}-listmonk' + name: "{{ include "listmonk.fullname" . }}-listmonk" port: number: 80 path: / pathType: Prefix tls: - {{- toYaml .Values.ingress.tls | nindent 4 }} -{{- end }} + {{ toYaml .Values.ingress.tls | nindent 4 }} +{{ end }} diff --git a/charts/listmonk/templates/secret-postgres.yaml b/charts/listmonk/templates/secret-postgres.yaml index 78a9be8..391166b 100644 --- a/charts/listmonk/templates/secret-postgres.yaml +++ b/charts/listmonk/templates/secret-postgres.yaml @@ -1,11 +1,11 @@ -{{- if .Values.postgres.enabled }} +{{ if .Values.postgres.enabled }} apiVersion: v1 kind: Secret metadata: labels: - {{- include "listmonk.labels" . | nindent 4 }} + {{ include "listmonk.labels" . | nindent 4 }} name: {{ include "listmonk.fullname" . }}-postgres data: PASSWORD: {{ required "A valid .Values.postgres.password is required" .Values.postgres.password | b64enc }} USER: {{ required "A valid .Values.postgres.user is required" .Values.postgres.user | b64enc }} -{{- end }} +{{ end }} diff --git a/charts/listmonk/templates/service-listmonk.yaml b/charts/listmonk/templates/service-listmonk.yaml index f885154..e21035d 100644 --- a/charts/listmonk/templates/service-listmonk.yaml +++ b/charts/listmonk/templates/service-listmonk.yaml @@ -3,12 +3,12 @@ kind: Service metadata: name: {{ include "listmonk.fullname" . }}-listmonk labels: - {{- include "listmonk.labels" . | nindent 4 }} + {{ include "listmonk.labels" . | nindent 4 }} spec: type: ClusterIP selector: deployment: listmonk - {{- include "listmonk.selectorLabels" . | nindent 4 }} + {{ include "listmonk.selectorLabels" . | nindent 4 }} ports: - name: http port: 80 diff --git a/charts/listmonk/templates/service-postgres.yaml b/charts/listmonk/templates/service-postgres.yaml index 47e2efd..d3e48b4 100644 --- a/charts/listmonk/templates/service-postgres.yaml +++ b/charts/listmonk/templates/service-postgres.yaml @@ -1,18 +1,18 @@ -{{- if .Values.postgres.enabled }} +{{ if .Values.postgres.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "listmonk.fullname" . }}-postgres labels: - {{- include "listmonk.labels" . | nindent 4 }} + {{ include "listmonk.labels" . | nindent 4 }} spec: type: ClusterIP selector: statefulSet: postgres - {{- include "listmonk.selectorLabels" . | nindent 4 }} + {{ include "listmonk.selectorLabels" . | nindent 4 }} ports: - name: postgres port: 5432 protocol: TCP targetPort: 5432 -{{- end }} +{{ end }} diff --git a/charts/listmonk/templates/statefulset-postgres.yaml b/charts/listmonk/templates/statefulset-postgres.yaml index d9f2edb..e264086 100644 --- a/charts/listmonk/templates/statefulset-postgres.yaml +++ b/charts/listmonk/templates/statefulset-postgres.yaml @@ -1,22 +1,22 @@ -{{- if .Values.postgres.enabled }} +{{ if .Values.postgres.enabled }} apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ include "listmonk.fullname" . }}-postgres labels: - {{- include "listmonk.labels" . | nindent 4 }} + {{ include "listmonk.labels" . | nindent 4 }} spec: replicas: 1 selector: matchLabels: statefulSet: postgres - {{- include "listmonk.selectorLabels" . | nindent 6 }} + {{ include "listmonk.selectorLabels" . | nindent 6 }} serviceName: postgres-hl template: metadata: labels: statefulSet: postgres - {{- include "listmonk.selectorLabels" . | nindent 8 }} + {{ include "listmonk.selectorLabels" . | nindent 8 }} name: postgres spec: containers: @@ -41,7 +41,7 @@ spec: optional: false image: {{ .Values.postgres.image.repository }}:{{ .Values.postgres.image.tag }} name: postgres - resources: {{- toYaml .Values.postgres.resources | nindent 10 }} + resources: {{ toYaml .Values.postgres.resources | nindent 10 }} volumeMounts: - mountPath: /var/lib/postgresql/data name: data @@ -61,4 +61,4 @@ spec: requests: storage: 10Gi volumeMode: Filesystem -{{- end }} +{{ end }}