feat: set up basic charm functionality#4
Merged
Conversation
6 tasks
weiiwang01
reviewed
Sep 18, 2025
gregory-schiano
left a comment
There was a problem hiding this comment.
Good progress, still some small fixes to do
gregory-schiano
left a comment
There was a problem hiding this comment.
Last round of comment I think 👍
weiiwang01
approved these changes
Oct 7, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applicable spec: ISD249 - Aproxy Subordinate Charm
Overview
Introduces the implementation of the Aproxy Charm, a subordinate charm designed to manage the aproxy snap. The charm configures and applies nftables rules to intercept outbound HTTP/HTTPS traffic and forward it through the aproxy service. It includes event handlers for lifecycle events (
install,start,config_changed, andstop) and ensures proper configuration and cleanup of the aproxy service.Rationale
To provide transparent proxying capabilities for applications. It ensures that outbound traffic is intercepted and routed through a proxy, enabling centralized traffic management and monitoring.
Juju Events Changes
Added Observers:
on.install: Handles the installation of the aproxy snap.on.start: Configures nftables rules and starts the interception service.on.config_changed: Reconfigures the aproxy snap and updates nftables rules when charm configuration changes.on.stop: Cleans up nftables rules and removes the aproxy snap during charm removal.Module Changes
Service Module:
_on_install,_on_start,_on_config_changed, and_on_stopmethods to handle Juju lifecycle events.Observer Module:
Observers for Juju events were added to manage the charm's lifecycle.
Library Changes
No external charm libraries were introduced or modified in this implementation. The charm relies on the
opsframework and standard Python librariessubprocess,socket,loggingto implement its functionality.Checklist
urgent,trivial,senior-review-required,documentation)docs/changelog.mdis updated with user-relevant changes.Full documentation will be done in a separate PR.