diff --git a/Taskfile.yaml b/Taskfile.yaml index 0dd075c..316edae 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -6,7 +6,7 @@ tasks: - docker buildx create --name multiarch --bootstrap --use docker:build: env: - VERSION: 5.1.28 + VERSION: 5.1.29 cmds: - docker build --platform linux/arm64 --builder=multiarch -t docker.io/tanjim/mautic:install-$VERSION --target=install --push . - docker build --platform linux/arm64 --builder=multiarch -t docker.io/tanjim/mautic:console-$VERSION --target=console --push . diff --git a/charts/mautic/Chart.yaml b/charts/mautic/Chart.yaml index 6e735d6..eb65bbd 100644 --- a/charts/mautic/Chart.yaml +++ b/charts/mautic/Chart.yaml @@ -18,7 +18,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 5.1.84 +version: 5.1.85 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/mautic/templates/cronjob.yaml b/charts/mautic/templates/cronjob.yaml index d22b3e6..734c8fd 100644 --- a/charts/mautic/templates/cronjob.yaml +++ b/charts/mautic/templates/cronjob.yaml @@ -25,6 +25,10 @@ spec: {{- end }} envFrom: {{- include "mautic.envFrom" . | nindent 14 }} + {{- if .Values.mautic.cron.import.env }} + env: + {{- toYaml .Values.mautic.cron.import.env | nindent 14 }} + {{- end }} volumeMounts: {{- include "mautic.volumeMounts" . | nindent 14 }} resources: @@ -67,6 +71,10 @@ spec: - flock envFrom: {{- include "mautic.envFrom" . | nindent 14 }} + {{- if .Values.mautic.cron.segmentsUpdate.env }} + env: + {{- toYaml .Values.mautic.cron.segmentsUpdate.env | nindent 14 }} + {{- end }} volumeMounts: {{- include "mautic.volumeMounts" . | nindent 14 }} resources: @@ -109,6 +117,10 @@ spec: - flock envFrom: {{- include "mautic.envFrom" . | nindent 14 }} + {{- if .Values.mautic.cron.campaignsTrigger.env }} + env: + {{- toYaml .Values.mautic.cron.campaignsTrigger.env | nindent 14 }} + {{- end }} volumeMounts: {{- include "mautic.volumeMounts" . | nindent 14 }} resources: @@ -154,6 +166,10 @@ spec: - flock envFrom: {{- include "mautic.envFrom" . | nindent 14 }} + {{- if .Values.mautic.cron.campaignsSummarize.env }} + env: + {{- toYaml .Values.mautic.cron.campaignsSummarize.env | nindent 14 }} + {{- end }} volumeMounts: {{- include "mautic.volumeMounts" . | nindent 14 }} resources: @@ -196,6 +212,10 @@ spec: - flock envFrom: {{- include "mautic.envFrom" . | nindent 14 }} + {{- if .Values.mautic.cron.campaignsRebuild.env }} + env: + {{- toYaml .Values.mautic.cron.campaignsRebuild.env | nindent 14 }} + {{- end }} volumeMounts: {{- include "mautic.volumeMounts" . | nindent 14 }} resources: @@ -230,6 +250,10 @@ spec: - flock envFrom: {{- include "mautic.envFrom" . | nindent 14 }} + {{- if .Values.mautic.cron.broadcastsSend.env }} + env: + {{- toYaml .Values.mautic.cron.broadcastsSend.env | nindent 14 }} + {{- end }} volumeMounts: {{- include "mautic.volumeMounts" . | nindent 14 }} resources: @@ -264,6 +288,47 @@ spec: - flock envFrom: {{- include "mautic.envFrom" . | nindent 14 }} + {{- if .Values.mautic.cron.messagesSend.env }} + env: + {{- toYaml .Values.mautic.cron.messagesSend.env | nindent 14 }} + {{- end }} + volumeMounts: + {{- include "mautic.volumeMounts" . | nindent 14 }} + resources: + {{- toYaml .Values.mautic.cron.import.resources | nindent 14 }} + restartPolicy: OnFailure + volumes: + {{- include "mautic.volumes" . | nindent 12 }} +{{- end }} +--- +# mautic:contacts:scheduled_export +{{- if .Values.mautic.cron.contactsScheduledExport.enabled }} +kind: CronJob +apiVersion: batch/v1 +metadata: + name: {{ include "mautic.fullname" . }}-contacts-scheduled-export + labels: + {{- include "mautic.labels" . | nindent 4 }} +spec: + concurrencyPolicy: Forbid + schedule: "{{ .Values.mautic.cron.contactsScheduledExport.schedule }}" + successfulJobsHistoryLimit: 1 + jobTemplate: + spec: + template: + spec: + containers: + - name: console + image: "{{ .Values.mautic.image.repository }}:console-{{ .Values.mautic.image.tag }}" + imagePullPolicy: "{{ .Values.mautic.image.pullPolicy }}" + args: + - mautic:contacts:scheduled_export + envFrom: + {{- include "mautic.envFrom" . | nindent 14 }} + {{- if .Values.mautic.cron.contactsScheduledExport.env }} + env: + {{- toYaml .Values.mautic.cron.contactsScheduledExport.env | nindent 14 }} + {{- end }} volumeMounts: {{- include "mautic.volumeMounts" . | nindent 14 }} resources: diff --git a/charts/mautic/values.yaml b/charts/mautic/values.yaml index 87744aa..4d74440 100644 --- a/charts/mautic/values.yaml +++ b/charts/mautic/values.yaml @@ -5,7 +5,7 @@ mautic: image: repository: docker.io/tanjim/mautic pullPolicy: IfNotPresent - tag: "5.1.28" + tag: "5.1.29" # existingConfigMap: "" # ignore the following values if existingConfigMap is set @@ -36,16 +36,16 @@ mautic: limits: memory: 1Gi requests: - cpu: 500m - memory: 512Mi + cpu: 200m + memory: 768Mi hpa: enabled: true minReplicas: 1 maxReplicas: 5 - targetCPU: 60 + targetCPU: 80 vpa: enabled: false - minMemory: 256Mi + minMemory: 512Mi maxMemory: 2Gi readinessProbe: &probe # check if request to /s/login returns 301 (redirect) status code @@ -75,9 +75,9 @@ mautic: siteUrl: "https://localhost:8080" resources: limits: - memory: 384Mi + memory: 1Gi requests: - memory: 256Mi + memory: 768Mi db: create: true @@ -104,9 +104,9 @@ mautic: # rebuild: true resources: &cron_resources limits: - memory: 512Mi + memory: 1Gi requests: - memory: 128Mi + memory: 256Mi segmentsUpdate: enabled: true schedule: "@every 2h" @@ -130,6 +130,12 @@ mautic: schedule: "*/10 * * * *" # limit: 5000 resources: *cron_resources + contactsScheduledExport: + enabled: true + schedule: "*/10 * * * *" + resources: *cron_resources + env: + PHP_INI_VALUE_MEMORY_LIMIT: "768M" broadcastsSend: enabled: true schedule: "*/5 * * * *" diff --git a/dockerfile b/dockerfile index f598238..b350d2c 100644 --- a/dockerfile +++ b/dockerfile @@ -2,7 +2,7 @@ ARG APT_DEPS="libcurl4-gnutls-dev libc-client-dev libkrb5-dev libmcrypt-dev libs FROM php:8.1-apache AS builder -ARG MAUTIC_VERSION=5.1 +ARG MAUTIC_VERSION=5.1.1 ARG APT_DEPS # Install PHP extensions @@ -59,7 +59,7 @@ ENV PHP_INI_VALUE_DATE_TIMEZONE=UTC \ PHP_INI_VALUE_UPLOAD_MAX_FILESIZE=512M \ PHP_INI_VALUE_POST_MAX_FILESIZE=512M \ PHP_INI_VALUE_MEMORY_LIMIT=512M \ - PHP_INI_VALUE_MAX_EXECUTION_TIME=300 + PHP_INI_VALUE_MAX_EXECUTION_TIME=600 COPY ./common/php.ini /usr/local/etc/php/php.ini