Popular charm library index

See also:

This is an index of the charm libraries that are currently known to be available.

This list may be missing libraries from charms that are not publicly listed on Charmhub. If you would like to add a library to the list, please drop a comment using the feedback link below.

Contents:

Libraries that define relations

The following libraries provide programmatic instructions for relating to a specific charm.

Library Used in Description
mongodb Defines a relation interface to the mongodb-k8s charm.
fluentbit fluentbit Defines both sides of a relation interface to the fluentbit charm.
redis Import RedisRequires from this lib to relate your charm to the redis-k8s charm.
grafana-dashboard Defines a relation interface for charms that provide a dashboard to the grafana-k8s charm.
grafana-source Defines a relation interface for charms that serve as a data source for the grafana-k8s charm.
prometheus-scrape Defines a relation interface for charms that want to expose metrics endpoints to the prometheus charm.
alertmanager-dispatch Defines a relation to the alertmanager-dispatch charm.
karma_dashboard karma-k8s Defines an interface for charms wishing to consume or provide a karma-dashboard relation.
loki_push_api loki_k8s Defines a relation interface for charms wishing to provide or consume the Loki Push API—e.g., a charm that wants to send logs to Loki.
log_proxy loki_k8s Defines a relation interface that allows a charm to act as a Log Proxy for Loki (via the Loki Push API).
guacd apache-guacd Defines a relation for charms wishing to set up a native server side proxy for Apache Guacamole.

Libraries that provide tools

These libraries provide re-usable tooling, typically to interact with cloud services, or to perform operations common to several charms.

Library Used in Description
cert kubernetes-dashboard Generates a self signed certificate.
capture_events traefik-k8s, data-platform-libs Helper for unittesting events.
networking <your charm here?> Provides tools for mocking networks.
compound-status <your charm here?> Provides utilities to track multiple independent statuses in charms.

Libraries that provide tools for Kubernetes charms

These libraries provide tooling for charms that run on top of Kubenetes clouds.

Library Used in Description
kubernetes_service_patch cos-configuration-k8s, alertmanager-k8s, grafana-agent-k8s, prometheus-k8s, loki-k8s, traefik-k8s Allows charm authors to simply and elegantly define service overrides that persist through a charm upgrade.
ingress nginx-ingress-integrator Configures nginx to use an existing Kubernetes Ingress.
ingress-per-unit traefik-k8s Configures traefik to provide per-unit routing.

Libraries that provide tools for machine charms

These libraries contain tools meant for use in machine charms, e.g., libraries that interact with package managers or other CLI tools that are often not present in containers.

Library Used in Description
apt mysql, zookeeper, cos-proxy, kafka, ceph-mon Install and manage packages via apt.
dnf Install and manage packages via dnf.
grub Mange kernel configuration via grub.
passwd Manage users and groups on a Linux system.
snap mongodb, mongodb-k8s, postgresql, grafana-agent-k8s, kafka Install and manage packages via snapd.
sysctl kafka Mange sysctl configuration.
systemd mongodb, pgbouncer, cos-proxy, ceph-mon, calico Interact with services via systemd.
1 Like

No edit rights so commenting instead:

2 Likes

@leon-mintz I added the libraries you listed. Thank you!

1 Like

Hello @pengale!

guacd defines a relation.

Btw, this index is really useful, thanks a lot for the work!

2 Likes

I think we should add this library too:

https://charmhub.io/observability-libs/libraries/kubernetes_service_patch

1 Like

Good call - that one probably lives in its own category like “Substrate specific libs” or similar

1 Like

Added kubernetes_service_patch (and added all the Observability Team charms that use it).

1 Like

I don’t have the right to update it, so I’m posting it here. Two new libraries are available:

  • grub to manage Linux kernel configuration
  • sysctl to manage sysctl configuration

During writing this post I found out that there is also the dnf library.

Thank you for the nice work to create the list!

re: Libraries that define relations

The mongodb link is broken (I think it should be removed as no longer valid). Charmed MongoDB (from Data Platform) provides no charm library. The common lib should be used “data-platform-libs” (charm) with mongodb_client interface described here: https://github.com/canonical/charm-relation-interfaces/#interfaces .

Tnx!