-
Notifications
You must be signed in to change notification settings - Fork 10
add 1st draft for charm architecture docs #534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,65 @@ | ||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||
| myst: | ||||||||||||||||||||||||||||
| html_meta: | ||||||||||||||||||||||||||||
| "description lang=en": "Architecture overview of the HAProxy project, its components, and how they work together to provide a TCP/HTTP reverse proxy solution." | ||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| (explanation_project_architecture)= | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Project architecture | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments. It features connection persistence through HTTP cookies, load balancing, header addition, modification, deletion both ways. It has request blocking capabilities and provides interface to display server status. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| The HAProxy charm repository is a collection of charms and snaps that manages the deployment and operation of HAProxy: | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| 1. `haproxy`: A machine charm managing HAProxy. See the [haproxy README](https://github.com/canonical/haproxy-operator/tree/main/haproxy-operator) for more information. | ||||||||||||||||||||||||||||
| 2. `haproxy-spoe-auth-operator`: A machine charm deploying an SPOE agent that serves as an authentication proxy. See the [haproxy-spoe-auth-operator README](https://github.com/canonical/haproxy-operator/tree/main/haproxy-spoe-auth-operator) for more information. | ||||||||||||||||||||||||||||
| 3. `haproxy-route-policy-operator`: A machine charm deploying the `haproxy-route-policy` application for controlling the data from different `haproxy-route` relations. See the [haproxy-route-policy-operator README](https://github.com/canonical/haproxy-operator/tree/main/haproxy-route-policy-operator) for more information. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| The repository also contains the snapped workload of some charms: | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| 1. `haproxy-spoe-auth-snap`: A snap of the SPOE agent made for the haproxy-spoe-auth-operator charm. See the [haproxy-spoe-auth-snap README](https://github.com/canonical/haproxy-operator/tree/main/haproxy-spoe-auth-snap) for more information. | ||||||||||||||||||||||||||||
| 2. `haproxy-route-policy-snap`: A snap of the `haproxy-route-policy` app made for the `haproxy-route-policy-operator` charm. See the [haproxy-route-policy-snap README](https://github.com/canonical/haproxy-operator/tree/main/haproxy-route-policy) for more information. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Architecture diagram | ||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would either remove this header entirely or update to something like
Suggested change
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```{mermaid} | ||||||||||||||||||||||||||||
| C4Component | ||||||||||||||||||||||||||||
| title Component diagram for HAProxy Charm | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Container_Boundary(haproxy, "HAProxy charm monorepo") { | ||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||
| Container_Boundary(haproxy_charm, "HAProxy") { | ||||||||||||||||||||||||||||
| Component(charm, "HAProxy charm") | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| Container_Boundary(spoe, "SPOE-auth") { | ||||||||||||||||||||||||||||
| Component(spoe_auth, "SPOE-auth charm") | ||||||||||||||||||||||||||||
| Component(spoe_auth_snap, "SPOE-auth snap") | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| Container_Boundary(ddos, "ddos-configurator") { | ||||||||||||||||||||||||||||
| Component(ddos, "ddos-configurator charm") | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
+38
to
+40
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any relations we can show between the ddos-configurator and any of the other charms? If they're optional, then we can explicitly state that in the text. |
||||||||||||||||||||||||||||
| Container_Boundary(haproxy_route_policy, "haproxy-route-policy") { | ||||||||||||||||||||||||||||
| Component(haproxy_route_policy_charm, "haproxy-route-policy charm") | ||||||||||||||||||||||||||||
| Component(haproxy_route_policy_snap, "haproxy-route-policy snap") | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Rel(charm, spoe_auth, "SPOE protocol", "Authentication offload") | ||||||||||||||||||||||||||||
| Rel(haproxy_route_policy_charm, charm, "haproxy-route-policy", "Route approval") | ||||||||||||||||||||||||||||
| Rel(spoe_auth, spoe_auth_snap, "Manages") | ||||||||||||||||||||||||||||
| Rel(haproxy_route_policy_charm, haproxy_route_policy_snap, "Manages") | ||||||||||||||||||||||||||||
|
Comment on lines
+47
to
+50
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Nitpick, to move the relation labels around so they're easier to read |
||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| The `haproxy` charm is the central component, responsible for configuring and running the HAProxy reverse proxy on machine. It receives routing information from related applications via `haproxy-route` (HTTP) and `haproxy-route-tcp` (TCP) relations and generates the appropriate HAProxy configuration. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| The `haproxy` charm can be deployed with the `haproxy-spoe-auth-operator` charm to add an authentication layer via an SPOE (Stream Processing Offload Engine) agent packaged in `haproxy-spoe-auth-snap`. HAProxy delegates authentication decisions to this agent which is integrated with an OIDC (OpenID Connect) provider charm. | ||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
nitpick |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| The `haproxy` charm can also be deployed with the `haproxy-route-policy-operator` charm to control which backends are permitted to be routed through `haproxy-route` relations. The workload of the `haproxy-route-policy-operator` charm is a Django application packaged as a snap. It evaluates incoming requests against configured rules and accepts or rejects them accordingly. It's deployed together with a PostgreSQL database. | ||||||||||||||||||||||||||||
|
Comment on lines
+53
to
+57
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we include information about the ddos-configurator here? |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Integrations | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| See the Integrations section on each of the component's Charmhub page for more details: | ||||||||||||||||||||||||||||
|
Comment on lines
+59
to
+61
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like this section could be enhanced. The basic question: What do we want readers to know about the available integrations? Some additional questions: Did we make any explicit design choices or enforce any opinions with the integrations that we want to highlight here (e.g., did we design the integrations so that they all feed back into |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| 1. [Integrations for haproxy-operator](https://charmhub.io/haproxy/integrations?channel=2.8/edge) | ||||||||||||||||||||||||||||
| 2. [Integrations for haproxy-spoe-auth-operator](https://charmhub.io/haproxy-spoe-auth/integrations?channel=latest/edge) | ||||||||||||||||||||||||||||
| 3. [Integrations for haproxy-route-policy-operator](https://charmhub.io/haproxy-route-policy/integrations?channel=latest/edge) | ||||||||||||||||||||||||||||
|
Comment on lines
+59
to
+65
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this section also link to the ddos-configurator charm's integrations tab? |
||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits for code-formatting the (CLI) charm names