feat: Add Matomo Chart for analytics

Also adds the Digitalist Chart as Backup in case the
bitnami one stops working.
This commit is contained in:
2025-09-11 10:25:17 +02:00
parent e427af50ce
commit 8f46e45cfb
40 changed files with 3733 additions and 16 deletions
@@ -0,0 +1,61 @@
---
{{- if .Values.matomo.cronJobs.coreArchive.enabled }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: matomo-jobs-corearchive
namespace: {{.Values.namespace}}
spec:
schedule: {{quote .Values.matomo.cronJobs.coreArchive.schedule}}
concurrencyPolicy: {{.Values.matomo.cronJobs.coreArchive.concurrencyPolicy}}
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
jobTemplate:
spec:
activeDeadlineSeconds: {{.Values.matomo.cronJobs.coreArchive.activeDeadlineSeconds}}
template:
spec:
{{ include "matomo.init" . | nindent 10 }}
containers:
- name: matomo-jobs-corearchive
image: {{.Values.matomo.image}}
imagePullPolicy: Always
{{- if .Values.matomo.cronJobs.coreArchive.resources }}
resources:
{{ toYaml .Values.matomo.cronJobs.coreArchive.resources | indent 14 }}
{{- end }}
securityContext:
runAsUser: {{.Values.matomo.runAsUser}}
privileged: false
allowPrivilegeEscalation: false
command: [ 'sh' , '-c' , '{{.Values.matomo.cronJobs.coreArchive.command}}' ]
env:
- name: MARIADB_MATOMO_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.db.password.secretKeyRef.name }}
key: {{ .Values.db.password.secretKeyRef.key }}
volumeMounts:
- name: static-data
mountPath: /var/www/html
- name: matomo-phpfpm
mountPath: /usr/local/etc/php-fpm.d/zz-global.conf
subPath: zz-global.conf
- name: matomo-cronjob-php
mountPath: /usr/local/etc/php/conf.d/zz-global.ini
subPath: zz-global.ini
restartPolicy: OnFailure
{{ include "matomo.images.pullSecrets" ( dict "images" (list .Values.matomo) "global" .Values.global) | nindent 10 }}
volumes:
- name: matomo-configuration
configMap:
name: matomo-configuration
- name: static-data
emptyDir: {}
- name: matomo-phpfpm
configMap:
name: matomo-phpfpm
- name: matomo-cronjob-php
configMap:
name: matomo-cronjob-php
{{- end -}}