Skip to content
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

add nginx workload #17

Merged
merged 4 commits into from
Dec 7, 2023
Merged

add nginx workload #17

merged 4 commits into from
Dec 7, 2023

Conversation

lucabello
Copy link
Contributor

@lucabello lucabello commented Dec 1, 2023

Issue

Closes #14.

Solution

This PR adds the Nginx workload to the Mimir Coordinator. Some points worth noting:

  • the Nginx configuration was taken from the Mimir HA helm chart and it's built with nginxinc/crossplane, a python package (provided by nginx) which handles the conversion "python dictionary" => "nginx config";
  • I added load balancing to the Nginx config, so that asking something to a distributor can reach all the workers that have the distributor role; at the moments it's round-robin (deafult), but we can decide what to do with it
  • some sections (i.e., log_verbose, resolver, basic_auth) are generated by functions and are supposed to be customizable (e.g., through Juju config options); at the moment those choices are hardcoded (i.e., calling log_verbose(False)), however it's easy to modify them in the future to expose those config options if we want to;
  • the config currently hardcodes the http scheme; this (plus certificate configurations) shall be updated when we implement TLS in the coordinator

Open questions / future things (FIXME, TODO)

  • we could allow the user to specify a custom block for the HTTP Nginx configuration through Juju config (it's something that's present in the Helm chart config, not sure if we need it or not)
  • the noAuthTenant value (currently set to FIXMEnoAuthTenant) should be taken from the Mimir configuration and passed to the Nginx object

@lucabello lucabello marked this pull request as ready for review December 6, 2023 14:29
src/charm.py Outdated Show resolved Hide resolved
src/nginx.py Show resolved Hide resolved
@lucabello lucabello merged commit a21d735 into main Dec 7, 2023
@lucabello lucabello deleted the feature/nginx-workload branch December 7, 2023 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the nginx workload
2 participants