-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
45d369a
commit 764e827
Showing
7 changed files
with
191 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Applicable spec: <link> | ||
|
||
### Overview | ||
|
||
<!-- A high level overview of the change --> | ||
|
||
### Rationale | ||
|
||
<!-- The reason the change is needed --> | ||
|
||
### Juju Events Changes | ||
|
||
<!-- Any changes to the juju events being observed (newly added, significantly modified or deleted) --> | ||
|
||
### Module Changes | ||
|
||
<!-- Any high level changes to modules and why (Service, Observer, helper) --> | ||
|
||
### Library Changes | ||
|
||
<!-- Any changes to charm libraries --> | ||
|
||
### Checklist | ||
|
||
- [ ] The [charm style guide](https://juju.is/docs/sdk/styleguide) was applied | ||
- [ ] The [contributing guide](https://github.com/canonical/is-charms-contributing-guide) was applied | ||
- [ ] The changes are compliant with [ISD054 - Managing Charm Complexity](https://discourse.charmhub.io/t/specification-isd014-managing-charm-complexity/11619) | ||
- [ ] The documentation is generated using `src-docs` | ||
- [ ] The documentation for charmhub is updated | ||
- [ ] The PR is tagged with appropriate label (`urgent`, `trivial`, `complex`) | ||
|
||
<!-- Explanation for any unchecked items above --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2024 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
|
||
lazydocs --no-watermark --output-path src-docs src/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
cosl | ||
ops>=1.2.0 | ||
tabulate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<!-- markdownlint-disable --> | ||
|
||
<a href="../src/charm.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
# <kbd>module</kbd> `charm.py` | ||
Charm for Content-cache on Kubernetes. | ||
|
||
**Global Variables** | ||
--------------- | ||
- **REQUIRED_INGRESS_RELATION_FIELDS** | ||
- **CACHE_PATH** | ||
- **CONTAINER_NAME** | ||
- **EXPORTER_CONTAINER_NAME** | ||
- **CONTAINER_PORT** | ||
- **REQUIRED_JUJU_CONFIGS** | ||
|
||
|
||
--- | ||
|
||
## <kbd>class</kbd> `ContentCacheCharm` | ||
Charm the service. | ||
|
||
Attrs: on: Ingress Charm Events ERROR_LOG_PATH: NGINX error log ACCESS_LOG_PATH: NGINX access log _metrics_endpoint: Provider of metrics for Prometheus charm _logging: Requirer of logs for Loki charm _grafana_dashboards: Dashboard Provider for Grafana charm ingress_proxy_provides: Ingress proxy provider ingress: Ingress requirer unit: Charm's designated juju unit model: Charm's designated juju model | ||
|
||
<a href="../src/charm.py#L65"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>function</kbd> `__init__` | ||
|
||
```python | ||
__init__(*args) | ||
``` | ||
|
||
Init function for the charm. | ||
|
||
|
||
|
||
**Args:** | ||
|
||
- <b>`args`</b>: Variable list of positional arguments passed to the parent constructor. | ||
|
||
|
||
--- | ||
|
||
#### <kbd>property</kbd> app | ||
|
||
Application that this unit is part of. | ||
|
||
--- | ||
|
||
#### <kbd>property</kbd> charm_dir | ||
|
||
Root directory of the charm as it is running. | ||
|
||
--- | ||
|
||
#### <kbd>property</kbd> config | ||
|
||
A mapping containing the charm's config and current values. | ||
|
||
--- | ||
|
||
#### <kbd>property</kbd> meta | ||
|
||
Metadata of this charm. | ||
|
||
--- | ||
|
||
#### <kbd>property</kbd> model | ||
|
||
Shortcut for more simple access the model. | ||
|
||
--- | ||
|
||
#### <kbd>property</kbd> unit | ||
|
||
Unit that this execution is responsible for. | ||
|
||
|
||
|
||
--- | ||
|
||
<a href="../src/charm.py#L224"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>function</kbd> `configure_workload_container` | ||
|
||
```python | ||
configure_workload_container(event: ConfigChangedEvent) → None | ||
``` | ||
|
||
Configure/set up workload container inside pod. | ||
|
||
|
||
|
||
**Args:** | ||
|
||
- <b>`event`</b>: config-changed event. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!-- markdownlint-disable --> | ||
|
||
<a href="../src/file_reader.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
# <kbd>module</kbd> `file_reader.py` | ||
Short module for file reverse reading. | ||
|
||
|
||
--- | ||
|
||
<a href="../src/file_reader.py#L11"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
## <kbd>function</kbd> `readlines_reverse` | ||
|
||
```python | ||
readlines_reverse(qfile) → Generator[int, NoneType, NoneType] | ||
``` | ||
|
||
Read the lines of a file in reverse order in a lazy way. | ||
|
||
|
||
|
||
**Args:** | ||
|
||
- <b>`qfile`</b>: File in StringIO format. | ||
|
||
|
||
|
||
**Yields:** | ||
A row from the read file. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters