matomo

by joaquinito2051

Helm chartv0.0.4

A Helm chart for Kubernetes

About this chart

Matomo Helm Chart (WMF)

A Wikimedia Foundation-authored helm chart for Matomo. Matomo bills itself as "Privacy-first analytics you can trust." Wikimedia Foundation uses Matomo on sites such as https://wikimediafoundation.org .

How to use

The helm chart makes use of Matomo's EnvironmentVariables plugin, which enables us to use variables directly from helmfile values.yaml files instead of rendering a config.ini.php.

Only the variables that appear in the charts values.yaml are supported. If you need to add a variable, start by adding it matomo-envvars.inc in the WMF Matomo OCI (Docker) image repo .

Apache configuration

files/apache/matomo.conf replaces the httpd-fcgi image's /etc/apache2/sites-enabled/000-default.conf through a read-only ConfigMap mount. It serves the copied application assets from /srv/app, forwards PHP requests to PHP-FPM over the configured Unix socket or TCP connection, and denies access to private application directories. It does not configure CAS or mod_php.

lamp.httpd.custom_config remains available for additional Apache configuration. Checksums trigger a pod rollout when either configuration changes, since the ConfigMaps are mounted using subPath.

Deploy matomo with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has matomo on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmatomo is pinned at v0.0.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply