Relation endpoints

See Integrations.

Database

The database relation endpoint is a mandatory relation that shares connection information for a MySQL database with MediaWiki, providing storage for MediaWiki. You may choose to directly connect to a MySQL charm, or use a MySQL router charm to connect to an existing MySQL cluster.

Example database integrate command:

juju integrate mediawiki-k8s mysql-k8s:database

TLS certificates

The optional certificates relation requests a certificate and private key for each MediaWiki unit. When a certificate is available, the charm configures Apache to serve MediaWiki over HTTPS on port 443 while continuing to serve HTTP on port 80. The certificate includes the Kubernetes service hostname so that Traefik can verify its HTTPS connection to the MediaWiki backend.

When this relation is integrated with traefik-route, the charm changes Traefik’s backend target from HTTP on port 80 to HTTPS on port 443. Configure Traefik to trust the certificate provider’s CA separately through Traefik’s certificate and CA transfer relations.

Example certificates integrate command:

juju integrate mediawiki-k8s:certificates self-signed-certificates:certificates

Certificate transfer

The optional receive-ca-cert relation receives CA certificates from an external certificate authority and installs them in MediaWiki’s system-wide workload trust store. The certificates are available to all TLS clients in the workload, including PHP and the Redis-compatible cache clients. The charm assumes that certificates supplied by the provider are valid CA certificates and applies them through the system trust-store update.

The charm accepts multiple receive-ca-cert relations. Certificates are combined into a charm-managed bundle at /usr/local/share/ca-certificates/certificate-transfer-ca.crt and the system trust store is refreshed when that bundle changes.

Example receive-ca-cert integrate command:

juju integrate mediawiki-k8s:receive-ca-cert self-signed-certificates:send-ca-cert

Grafana dashboard

The grafana dashboard relation is part of the COS relation, providing a pre-built Grafana dashboard tailored to fit the needs of the MediaWiki charm. The provided dashboard requires both the logging relation and the metrics-endpoint relation to be established to the COS deployment. Modifications to the dashboard can be made but will not be persisted upon restart or redeployment of the charm. Learn more about COS here.

Example grafana-dashboard integrate command:

juju integrate mediawiki-k8s grafana-k8s

Logging

The logging relation is a part of the COS relation to enhance logging observability. Logging relation through the loki_push_api interface forwards the standard outputs of all workloads as well as /var/log/mediawiki/logs.log to Loki. This can then be queried through the Loki API or easily visualized through Grafana. For default log levels and forwarding behavior, see the logging reference. Learn more about COS here.

Example logging integrate command:

juju integrate mediawiki-k8s loki-k8s

Metrics endpoint

The metrics-endpoint relation exposes workload metrics for supported charms in the OpenMetrics format. Apache metrics are collected from the internal /server-status endpoint using Apache exporter and then published through this relation. PHP-FPM metrics are scraped from /php-fpm-status?openmetrics. Metrics from the git-sync sidecar are also published through the metrics-endpoint relation. This relation is part of the COS observability integration. Learn more about COS here.

Example metrics-endpoint integrate command:

juju integrate mediawiki-k8s prometheus-k8s

See also

Read more about the metrics provided by the MediaWiki charm on the metrics reference documentation.

Workload tracing

The optional workload-tracing relation accepts one provider and requests an OTLP/HTTP receiver. MediaWiki’s native tracer sends JSON trace data to that receiver’s /v1/traces path.

HTTPS receivers use certificate verification against the workload’s system trust store. For a private CA, use the receive-ca-cert relation.

Example integration:

juju integrate mediawiki-k8s:workload-tracing opentelemetry-collector-k8s:receive-traces

OAuth

Warning

While the oauth relation will function while configuring MediaWiki to use a HTTP or protocol-relative URL, it is highly recommended to explicitly allow only HTTPS in a production environment.

The oauth relation connects with an OAuth provider to allow for easy setup of OAuth based SSO.

This is accomplished using the OpenID Connect MediaWiki extension, which is included with the MediaWiki charm. The OpenID Connect extension can be further configured through the oauth-extra-scopes and local-settings configuration options.

Example oauth integrate command:

juju integrate mediawiki-k8s hydra:oauth

See also

Read more about the Canonical Identity Platform.

Valkey

The mandatory valkey relation connects MediaWiki to a Valkey instance for caching, session storage, and asynchronous job execution. Valkey is the only supported key-value store charm.

The charm is blocked when this relation is missing and waits when connection data is incomplete. In either state, MediaWiki and its job workers are stopped. The charm uses the supplied connection data without probing Valkey connectivity or credentials.

MediaWiki and SimpleSAMLphp use Redis-compatible clients to connect to Valkey. Their configuration keys and job-runner service names retain Redis terminology; this does not indicate support for the Redis charm.

Example valkey integrate command:

juju integrate mediawiki-k8s valkey:valkey-client

SAML

The saml relation connects MediaWiki to a SAML Identity Provider (IdP) through the saml-integrator charm, enabling SAML based SSO.

This is accomplished using the SimpleSAMLphp MediaWiki extension, which is included with the MediaWiki charm. The SimpleSAMLphp extension uses the PluggableAuth framework for authentication.

Warning

While the saml relation will function while configuring MediaWiki to use a HTTP or protocol-relative URL, it is highly recommended to explicitly allow only HTTPS in a production environment.

SimpleSAMLphp uses the required Valkey integration as its session store.

Example saml integrate command:

juju integrate mediawiki-k8s saml-integrator:saml

See also

Read more about SimpleSAMLphp and the Canonical Identity Platform.

S3 parameters

The s3-parameters relation endpoint provides MediaWiki with the necessary information to upload files to an S3-compatible object storage service, allowing for user uploads of files. This relation is only required if you wish to allow file uploads in your MediaWiki instance.

The MediaWiki charm uses the included AWS MediaWiki extension for this functionality.

Important

For security reasons and separation of load, the MediaWiki charm will not act as a reverse proxy for the S3 compatible object storage service. You need to separately ensure that your users can reach and read from your configured object storage service.

To configure which endpoint MediaWiki will redirect users to in order to serve file uploads, configure the $wgAWSBucketDomain parameter in the local-settings configuration option.

Refer to the AWS MediaWiki extension documentation for more information on how to configure the AWS extension.

Example s3-parameters integrate command:

juju integrate mediawiki-k8s s3-integrator:s3-credentials

SMTP

The smtp relation connects MediaWiki to SMTP relay configuration through the smtp-integrator charm, enabling outgoing emails for features such as account recovery and notifications.

When available, the charm configures MediaWiki’s SMTP settings including relay host, port, authentication, and optional sender address. If relation data is incomplete or malformed, outgoing email is disabled until valid data is provided.

When the Juju model has an HTTP proxy configured, SMTP traffic uses that proxy unless the relay host matches JUJU_CHARM_NO_PROXY.

Example smtp integrate command:

juju integrate mediawiki-k8s smtp-integrator:smtp

Traefik route

The traefik_route relation allows MediaWiki to connect to a Traefik charm deployment to automatically configure routing from outside the Kubernetes cluster to MediaWiki.

Example traefik_route integrate command:

juju integrate mediawiki-k8s traefik-k8s:traefik_route