Skip to main content

Envoy Proxy control-plane written in Python

Project description

sovereign

Mission statement

This project implements a JSON control-plane based on the envoy data-plane-api

The purpose of sovereign is to supply downstream envoy proxies with configuration in near-realtime by responding to discovery requests.

Mechanism of Operation

tl;dr version:

* Polls HTTP/File/Other for data
* (optional) Applies transforms to the data
* Uses the data to generate Envoy configuration from templates

In a nutshell, Sovereign gathers contextual data ("sources" and "template context"), optionally applies transforms to that data (using "modifiers") and finally uses the data to generate envoy configuration from either python code, or jinja2 templates.

This is performed in a semi-stateless way, where the only state is data cached in memory.

Template context is intended to be statically configured, whereas Sources are meant to be dynamic - for example, fetching from an API, an S3 bucket, or a file that receives updates.

Modifiers can mutate the data retrieved from sources, just in case the data is in a less than favorable structure.

Both modifiers and sources are pluggable, i.e. it's easy to write your own and plug them into Sovereign for your use-case.

Currently, Sovereign supports only providing configuration to Envoy as JSON. That is to say, gRPC is not supported yet. Contributions in this area are highly appreciated!

The JSON configuration can be viewed in real-time with Sovereign's read-only web interface.

Requirements

  • Python 3.8+

Installation

pip install sovereign

Documentation

Read the docs here!

:new: Read-only user interface

Added in v0.5.3!

This interface allows you to browse the resources currently returned by Sovereign.

Sovereign User Interface Screenshot

Local development

Requirements

  • Docker
  • Docker-compose

Installing dependencies for dev

I recommend creating a virtualenv before doing any dev work

python3 -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt

Running locally

Running the test env

make run

Running the test env daemonized

make run-daemon

Pylint

make lint

Unit tests

make unit

Acceptance tests

make run-daemon acceptance

Contributors

Pull requests, issues and comments welcome. For pull requests:

  • Add tests for new features and bug fixes
  • Follow the existing style
  • Separate unrelated changes into multiple pull requests

See the existing issues for things to start contributing.

For bigger changes, make sure you start a discussion first by creating an issue and explaining the intended change.

Atlassian requires contributors to sign a Contributor License Agreement, known as a CLA. This serves as a record stating that the contributor is entitled to contribute the code/documentation/translation to the project and is willing to have it used in distributions and derivative works (or is willing to transfer ownership).

Prior to accepting your contributions we ask that you please follow the appropriate link below to digitally sign the CLA. The Corporate CLA is for those who are contributing as a member of an organization and the individual CLA is for those contributing as an individual.

License

Copyright (c) 2018 Atlassian and others. Apache 2.0 licensed, see LICENSE.txt file.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sovereign-0.19.3.tar.gz (92.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sovereign-0.19.3-py3-none-any.whl (102.7 kB view details)

Uploaded Python 3

File details

Details for the file sovereign-0.19.3.tar.gz.

File metadata

  • Download URL: sovereign-0.19.3.tar.gz
  • Upload date:
  • Size: 92.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.10.101

File hashes

Hashes for sovereign-0.19.3.tar.gz
Algorithm Hash digest
SHA256 d1320e600b806f725c4ae0cd8c45ac797250b83fe91a059db8b0f17ac88da7bf
MD5 be29f3d3680f83a26f1df9be1cbb2569
BLAKE2b-256 5d8382e5b434211c9f8d82612802dae16fca2ba572090aa573c4b311f7427f49

See more details on using hashes here.

File details

Details for the file sovereign-0.19.3-py3-none-any.whl.

File metadata

  • Download URL: sovereign-0.19.3-py3-none-any.whl
  • Upload date:
  • Size: 102.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.10.101

File hashes

Hashes for sovereign-0.19.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4eaa6e4e102af50190ceb6a0e3a373f140bf6355470f5cd5dbfd83bce397b531
MD5 d04f72783391541b6d652a2814a7a210
BLAKE2b-256 c25dcf66d7005f8cf80552bed3db9ce179d49a3a381bbb2113c09713fcee77f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page