Integrations

db

Interface: pgsql

Supported charms: postgresql-k8s, PostgreSQL

Database integration is a required relation for the Discourse charm to supply structured data storage for Discourse.

Database integrate command:

juju integrate discourse-k8s postgresql-k8s

grafana-dashboard

Interface: grafana-dashboard

Supported charms: grafana-k8s

Grafana-dashboard relation enables quick dashboard access already tailored to fit the needs of operators to monitor the charm. The template for the Grafana dashboard for Discourse charm can be found at /src/grafana_dashboards/discourse.json. In Grafana UI, it can be found as “Discourse Operator” under the General section of the dashboard browser (/dashboards). Modifications to the dashboard can be made but will not be persisted upon restart/redeployment of the charm.

Grafana-Prometheus integrate command:

juju integrate grafana-k8s:grafana-source prometheus-k8s:grafana-source

Grafana-dashboard integrate command:

juju integrate discourse-k8s grafana-dashboard`

ingress

Interface: ingress

Supported charms: nginx-ingress-integrator, traefik

Ingress manages external http/https access to services in a kubernetes cluster. Note that the kubernetes cluster must already have an nginx ingress controller already deployed. Documentation to enable ingress in MicroK8s can be found in Add-on: Ingress.

Ingress integrate command:

juju integrate discourse-k8s nginx-ingress-integrator

metrics-endpoint

Supported charms: prometheus-k8s

Metrics-endpoint relation allows scraping the /metrics endpoint provided by Discourse. The metrics are exposed in the open metrics format and will only be scraped by Prometheus once the relation becomes active. For more information about the metrics exposed, refer to “How to monitor Discourse metrics using Prometheus”.

Metrics-endpoint integrate command:

juju integrate discourse-k8s prometheus-k8s

oauth

Interface: oauth

Supported charms: Hydra

OAuth relation allows Discourse to integrate with an OAuth provider for authentication and authorization. This enables users to log in to Discourse using their existing credentials from the provider. The easiest way to use the Hydra is to deploy Canonical Identity Platform.

OAuth integrate command:

juju integrate discourse-k8s hydra

redis

Interface: redis

Supported charms: redis-k8s

Discourse uses Redis to run background tasks (with Sidekiq) and keep the application fast and responsive. It enables real-time updates on the pages and helps in managing data efficiently. Redis also helps Discourse in balancing loads by managing rate limits, making it a crucial part of its system.

Redis integrate commands:

juju integrate discourse-k8s redis-k8s

valkey

Interface: valkey_client

Supported charms: valkey

Valkey is an open source fork of Redis and can be used instead of Redis. Discourse connects to the Valkey primary endpoint with the credentials provided by the integration. If both Redis and Valkey are related, Discourse uses Valkey. TLS connections to Valkey aren’t supported yet. Discourse requires a Valkey charm revision that allows the TIME command for client users, available in the 9/edge channel at the time of writing.

While Valkey hasn’t provided its connection details yet, the charm waits and Discourse keeps running with its current settings. You can switch from Redis to Valkey by relating Valkey, without removing the Redis relation first: Discourse keeps using Redis until Valkey is ready. If the Valkey connection details are invalid, for example because TLS is enabled, the charm is blocked and Discourse is stopped, even if Redis is related.

Switching between Redis and Valkey doesn’t copy any data. Background jobs waiting in the Sidekiq queues, scheduled and retried jobs, and cached data are lost. Discourse recreates its periodic jobs and caches on its own, but jobs that were waiting to run, such as pending emails or notifications, aren’t run. Switch during a quiet period.

Valkey integrate commands:

juju deploy valkey --channel 9/edge --trust
juju integrate discourse-k8s valkey