Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0dd1e0c
Implements TLS in Litmus backend
Gmerold Sep 8, 2025
2211cde
Removes coordinated-workers from project deps
Gmerold Sep 8, 2025
48b96d4
Adds cryptography to project deps
Gmerold Sep 8, 2025
ce010fb
Update backend/tests/unit/certificates_helpers.py
Gmerold Sep 9, 2025
8ac8925
Refactors itests, fixes typos
Gmerold Sep 9, 2025
06adc31
Refactors Tls to not reqiure charm instance
Gmerold Sep 9, 2025
4c843eb
Removes charm dependency from litmus_backend
Gmerold Sep 9, 2025
1575c87
Removes CharmBase import from litmus_backend
Gmerold Sep 9, 2025
3aa0afc
Simplifies tls module according to PR comments
Gmerold Sep 9, 2025
b619123
Uses subprocess.getoutput in the itests
Gmerold Sep 9, 2025
d5629d5
Fixes docstring is tls; minor refactoring in itests
Gmerold Sep 9, 2025
68486ad
Adds app_hostname to _certificate_request_attributes
Gmerold Sep 9, 2025
ed0254d
Fixes typo
Gmerold Sep 9, 2025
b4020cd
Fixes itests
Gmerold Sep 9, 2025
612941d
Fixes usage of tls_certs
Gmerold Sep 9, 2025
3ac57ba
Refactors tls not to require TLS charm lib
Gmerold Sep 10, 2025
dbc11b0
Pushes broken test for debugging
Gmerold Sep 10, 2025
22943aa
fix issue with container filesystem
PietroPasotti Sep 10, 2025
18fa22e
Fixes tests
Gmerold Sep 10, 2025
26306fb
Replaces _tls_config with tls_config_getter in backend
Gmerold Sep 11, 2025
ded7d57
Fixes publishing HTTP and gRPC endpoints
Gmerold Sep 11, 2025
2e77a98
Rebasing on top of latest main
Gmerold Sep 11, 2025
c971fe5
Replaces local implementation of TLS with the one from litmus-libs
Gmerold Sep 11, 2025
b96670c
Update backend/src/litmus_backend.py
Gmerold Sep 12, 2025
d6c183f
Minor refactoring
Gmerold Sep 12, 2025
c07edcb
Fixes indent
Gmerold Sep 12, 2025
2327dd2
xfails nginx tests
Gmerold Sep 12, 2025
8e843cb
Merge branch 'main' into TAP-718-tls-in-backend
Gmerold Sep 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Litmus Operator
# Litmus Backend K8s Operator

[![CharmHub Badge](https://charmhub.io/litmus-backend-k8s/badge.svg)](https://charmhub.io/litmus-backend-k8s)
[![Release](https://github.com/canonical/litmus-operators/actions/workflows/release.yaml/badge.svg)](https://github.com/canonical/litmus-operators/actions/workflows/release.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)

This directory contains the source code for a Charmed Operator that partially drives [LitmusChaos] on Kubernetes. It is designed to work together with other charms to deploy and operate the control plane of LitmusChaos, an open source platform for chaos testing.

This directory contains the source code for a Charmed Litmus Backend K8s Operator that partially drives [LitmusChaos] on Kubernetes. It is designed to work together with other charms to deploy and operate the control plane of LitmusChaos, an open source platform for chaos testing.

## Usage

Expand All @@ -15,8 +14,18 @@ Assuming you have access to a bootstrapped Juju controller on Kubernetes, you ca
$ juju deploy litmus-backend-k8s # --trust (use when cluster has RBAC enabled)
```

### Enabling Transport Layer Security (TLS)

Litmus Backend K8s Operator supports integration with TLS certificates over the `tls-certificates` charm interface. Example:

```bash
$ juju deploy self-signed-certificates --channel=1/stable
$ juju integrate litmus-backend-k8s self-signed-certificates
```

## OCI Images

**litmuschaos-server**: ubuntu/litmuschaos-server:3-24.04_edge

## Contributing

Expand Down
22 changes: 21 additions & 1 deletion backend/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,20 @@ summary: |
containers:
backend:
resource: litmus-backend-image
mounts:
- storage: certs
location: /etc/tls

resources:
litmus-backend-image:
type: oci-image
description: OCI image for Litmus Backend server
upstream-source: ubuntu/litmuschaos-server:3-24.04_edge

storage:
certs:
type: filesystem
minimum-size: 1M

links:
documentation: https://discourse.charmhub.io/t/18790
Expand All @@ -48,6 +55,12 @@ requires:
limit: 1
description: |
Exchange the gRPC server endpoints of the auth and backend components.
tls-certificates:
optional: true
interface: tls-certificates
limit: 1
description: |
Receive TLS certificates.

provides:
http-api:
Expand All @@ -64,7 +77,14 @@ parts:
charm:
source: .
plugin: uv
build-packages: [git] # handy for git+ dependencies during development
build-packages:
- git # handy for git+ dependencies during development
# Required by the tls_certificates_interface
- cargo
- libffi-dev
- libssl-dev
- pkg-config
- rustc
build-snaps: [astral-uv]
# FIXME: override-build with "git describe --always > $CRAFT_PART_INSTALL/version" causes
# charm pack to fail "fatal: not a git repository (or any of the parent directories): .git"
Expand Down
Loading
Loading