Skip to content

Commit

Permalink
Release listmonk chart: v0.3.0, app: v4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
th0th committed Nov 4, 2024
1 parent fb9a367 commit 77c9869
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 32 deletions.
4 changes: 2 additions & 2 deletions charts/listmonk/templates/configmap-listmonk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions charts/listmonk/templates/configmap-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
13 changes: 6 additions & 7 deletions charts/listmonk/templates/deployment-listmonk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions charts/listmonk/templates/ingress-listmonk.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{{- 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}}
http:
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 }}
6 changes: 3 additions & 3 deletions charts/listmonk/templates/secret-postgres.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 2 additions & 2 deletions charts/listmonk/templates/service-listmonk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions charts/listmonk/templates/service-postgres.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
12 changes: 6 additions & 6 deletions charts/listmonk/templates/statefulset-postgres.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -61,4 +61,4 @@ spec:
requests:
storage: 10Gi
volumeMode: Filesystem
{{- end }}
{{ end }}

0 comments on commit 77c9869

Please sign in to comment.