From 1671ba0d0d5b599af842e4782a768adbca692348 Mon Sep 17 00:00:00 2001 From: Amanda Hager Lopes de Andrade Katz Date: Tue, 3 Sep 2024 15:55:49 -0300 Subject: [PATCH 1/4] docs: Change README --- README.md | 40 +++++++++++++++++------ src-docs/charm.py.md | 77 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 9 deletions(-) create mode 100644 src-docs/charm.py.md diff --git a/README.md b/README.md index 5d8da8e..346da1d 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,42 @@ Avoid using this README file for information that is maintained or published els Use links instead. --> +[![CharmHub Badge](https://charmhub.io/maubot/badge.svg)](https://charmhub.io/maubot) +[![Publish to edge](https://github.com/canonical/maubot-operator/actions/workflows/publish_charm.yaml/badge.svg)](https://github.com/canonical/maubot-operator/actions/workflows/publish_charm.yaml) +[![Promote charm](https://github.com/canonical/maubot-operator/actions/workflows/promote_charm.yaml/badge.svg)](https://github.com/canonical/maubot-operator/actions/workflows/promote_charm.yaml) +[![Discourse Status](https://img.shields.io/discourse/status?server=https%3A%2F%2Fdiscourse.charmhub.io&style=flat&label=CharmHub%20Discourse)](https://discourse.charmhub.io) -# is-charms-template +# Maubot operator -Charmhub package name: operator-template -More information: https://charmhub.io/is-charms-template +A Juju charm deploying and managing Maubot on Kubernetes. -Describe your charm in one or two sentences. +Maubot is a plugin-based Matrix bot system written in Python. -## Other resources +## Architecture - +```mermaid +graph TD; + user[User] --> ingress[Ingress]; -- [Read more](https://example.com) + subgraph " " + direction TB; + nginx[NGINX] --> maubot[Maubot]; + end; -- [Contributing](CONTRIBUTING.md) + ingress --> nginx; -- See the [Juju SDK documentation](https://juju.is/docs/sdk) for more information about developing and improving charms. + maubot --> postgresql[PostgreSQL Database]; + maubot --> synapse[Synapse Homeserver]; +``` + +## Project and community + +The Maubot Operator is a member of the Ubuntu family. It's an open source +project that warmly welcomes community projects, contributions, suggestions, +fixes and constructive feedback. +* [Code of conduct](https://ubuntu.com/community/code-of-conduct) +* [Get support](https://discourse.charmhub.io/) +* [Join our online chat](https://matrix.to/#/#charmhub-charmdev:ubuntu.com) +* [Contribute](https://charmhub.io/maubot/docs/contributing) +* [Getting Started](https://charmhub.io/maubot/docs/getting-started) +Thinking about using the Maubot Operator for your next project? [Get in touch](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)! diff --git a/src-docs/charm.py.md b/src-docs/charm.py.md new file mode 100644 index 0000000..7be960a --- /dev/null +++ b/src-docs/charm.py.md @@ -0,0 +1,77 @@ + + + + +# module `charm.py` +Charm the service. + +Refer to the following post for a quick-start guide that will help you develop a new k8s charm using the Operator Framework: + +https://discourse.charmhub.io/t/4208 + +**Global Variables** +--------------- +- **VALID_LOG_LEVELS** + + +--- + +## class `IsCharmsTemplateCharm` +Charm the service. + + + +### function `__init__` + +```python +__init__(*args: Any) +``` + +Construct. + + + +**Args:** + + - `args`: Arguments passed to the CharmBase parent constructor. + + +--- + +#### property app + +Application that this unit is part of. + +--- + +#### property charm_dir + +Root directory of the charm as it is running. + +--- + +#### property config + +A mapping containing the charm's config and current values. + +--- + +#### property meta + +Metadata of this charm. + +--- + +#### property model + +Shortcut for more simple access the model. + +--- + +#### property unit + +Unit that this execution is responsible for. + + + + From 1668f37ff0ea166583b53e7b2e759eb3db598b9b Mon Sep 17 00:00:00 2001 From: Amanda Hager Lopes de Andrade Katz Date: Tue, 3 Sep 2024 16:05:44 -0300 Subject: [PATCH 2/4] docs: add links --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 346da1d..9100a85 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,14 @@ Use links instead. # Maubot operator -A Juju charm deploying and managing Maubot on Kubernetes. +A Juju charm deploying and managing [Maubot](https://github.com/maubot/maubot) on Kubernetes. -Maubot is a plugin-based Matrix bot system written in Python. +Maubot is a plugin-based [Matrix](https://matrix.org/) bot system written in Python. ## Architecture +The charm has the following architecture: + ```mermaid graph TD; user[User] --> ingress[Ingress]; From d68f497d9b20ecaf987320c9408f9ba6ff258b8a Mon Sep 17 00:00:00 2001 From: Amanda Hager Lopes de Andrade Katz Date: Mon, 9 Sep 2024 10:51:32 -0300 Subject: [PATCH 3/4] fix: add .trivyignore --- .trivyignore | 2 ++ src-docs/charm.py.md | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .trivyignore diff --git a/.trivyignore b/.trivyignore new file mode 100644 index 0000000..076b146 --- /dev/null +++ b/.trivyignore @@ -0,0 +1,2 @@ +# Pebble CVE +CVE-2024-34156 diff --git a/src-docs/charm.py.md b/src-docs/charm.py.md index 1f8fc26..5cf84b6 100644 --- a/src-docs/charm.py.md +++ b/src-docs/charm.py.md @@ -3,7 +3,6 @@ # module `charm.py` - Maubot charm service. **Global Variables** From 0cdc949470bcbe45865a77883f91b53af931fb61 Mon Sep 17 00:00:00 2001 From: Amanda Hager Lopes de Andrade Katz Date: Mon, 9 Sep 2024 11:00:47 -0300 Subject: [PATCH 4/4] fix: ignore license for trivyignore file --- .licenserc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.licenserc.yaml b/.licenserc.yaml index ef7164e..6b3f8cc 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -9,6 +9,7 @@ header: - '**' paths-ignore: - '.github/**' + - '.trivyignore' - '**/*.json' - '**/*.md' - '**/*.txt'