SMTP Integrator
- Canonical IS DevOps
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 45 | 19 Aug 2024 | |
latest/edge | 65 | 05 Mar 2025 |
juju deploy smtp-integrator
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
Charm architecture
The SMTP Integrator charm fetches a centralized SMTP configuration and propagates it through a Juju integration.
The SMTP Integrator can be deployed in Kubernetes and machine models. As a workloadless charm, the SMTP Integrator doesn’t have any OCI images.
The charm provides a library to facilitate the development of charms that use the SMTP integration.
Juju events
According to the Juju SDK: “an event is a data structure that encapsulates part of the execution context of a charm”.
For this charm, the following events are observed:
- config-changed: Usually fired in response to a configuration change using the GUI or CLI. Action: validate the configuration and propagate the SMTP configuration through the relation.
- update-status: Fired periodically. Action: propagate the SMTP configuration through the relation.
- smtp-relation-created: Custom event for when a new SMTP relations joins. Action: write the SMTP details in the relation databag. The
smtp
integration will share a secret id across the relation the requirer will be able to access to retrieve the password. - smtp-legacy-relation-created: Custom event for when a new legacy SMTP relations joins. Action: write the SMTP details in the relation databag. The
smtp-legacy
integration will share the password across the relation.
Charm code overview
The src/charm.py
is the default entry point for a charm and has the SmtpIntegratorOperatorCharm Python class which inherits from CharmBase.
CharmBase is the base class from which all Charms are formed, defined by Ops (Python framework for developing charms).
See more information in Ops documentation.
The __init__
method guarantees that the charm observes all events relevant to its operation and handles them.