Endpoint

In Juju, an endpoint is a struct defined in an application’s charm’s metadata.yaml / (since Charmcraft 2.5) charmcraft.yaml consisting of

  • a name (charm-specific),
  • a role (one of provides, requires = ‘can use’, or peers), and
  • an interface

whose purpose is to help define a relation (integration).

For example, the MySQL application deployed from the mysql charm has an endpoint called mysql with role provides and interface mysql and this can be used to form a non-subordinate relation with WordPress.

See more: GitHub | mysql-operator > metadata.yaml, Charmhub | mysql

All charms have an implicit (not in their metadata.yaml / charmcraft.yaml) endpoint with name juju-info, role provides, and interface juju-info which can be used to form subordinate relations with subordinate charms that have an explicit endpoint with name juju-info, role requires, and interface juju-info (e.g., mysql-router).

Just a note to consider changing “relation” to “integration” and then link to its page.

I feel it would also help clarify things to say a few words on what is meant by an “interface”. Something like:

An interface is a protocol that can be implemented across the charm ecosystem. When two charms each have an endpoint that supports a common interface they are able to auto-negotiate a connection. This connection is called an integration.

I think the last diagram is not quite correct because the peer integration with interface reversenginx is drawn between different applications (C and D). As I understand it, peer integrations can only exist between units of the same application.

1 Like

@tmihoc ^^^

2 Likes