No description
This repository has been archived on 2026-04-20. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Python 81.5%
  • HTML 7.2%
  • JavaScript 5.8%
  • Shell 4%
  • Mako 1%
  • Other 0.5%
Find a file
dependabot[bot] fcc98ce436
Bump gunicorn from 20.1.0 to 22.0.0 (#82)
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.1.0 to 22.0.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.1.0...22.0.0)

---
updated-dependencies:
- dependency-name: gunicorn
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-17 09:12:38 +01:00
.github/workflows Improve CI and Build Process 2024-02-09 21:05:33 +00:00
.vscode catch and return template errors 2022-10-10 09:58:56 +01:00
api_reflector feat: add global kv-storage prototype 2023-10-06 14:08:21 +01:00
deploy/kube Added required namespaces for Flux 0.18 2021-10-12 12:06:53 +01:00
scripts chore: update to latest poetry 2023-06-15 17:07:14 +01:00
tests chore: poetry lock and mypy config update 2023-10-05 16:10:52 +01:00
.dockerignore fix: constrain sqlalchemy version to 1.x 2023-06-16 11:55:44 +01:00
.env.example 🚨 clear up warnings & deprecations 2022-10-02 19:55:40 +01:00
.gitignore initial commit 2021-07-25 21:57:06 +01:00
docker-compose-local.yml chore: poetry lock and mypy config update 2023-10-05 16:10:52 +01:00
Dockerfile Revert wsgi.py change 2024-02-09 22:06:29 +00:00
LICENSE add license 2021-08-18 12:16:59 +01:00
poetry.lock Bump gunicorn from 20.1.0 to 22.0.0 (#82) 2024-04-17 09:12:38 +01:00
pyproject.toml Bump gunicorn from 20.1.0 to 22.0.0 (#82) 2024-04-17 09:12:38 +01:00
README.md docs: fix ci badge in readme 2024-02-28 11:35:46 +00:00
settings.py feat: add global kv-storage prototype 2023-10-06 14:08:21 +01:00
wsgi.py Revert wsgi.py change 2024-02-09 22:06:29 +00:00

api-reflector

CI

A configurable API mocking service.

Development

api-reflector uses poetry for dependency management.

It is recommended that you use poetry 1.2+ along with poetry-dotenv-plugin for easier project configuration.

$ poetry install
$ poetry shell
$ api-reflector-migrate
$ flask run

All configuration is done via environment variables. If you are using poetry-dotenv-plugin or another dotenv tool, you can use a .env file in the project root to set configuration variables. .env.example is provided as an example. If you use the example dotenv file, make sure you update secret_key.

Azure auth

Azure SSO can be enabled by setting azure_auth_enabled to true in your environment. If Azure SSO is enabled, three extra environment variables need to be provided:

azure_client_id
azure_client_secret
azure_tenant

Local Testing

By default, insecure redirect URLS will be rejected. If you want to test locally, set OAUTHLIB_INSECURE_TRANSPORT=true in your environment.

Docker-compose

Spin up postgres and api reflector containers with docker compose:

From project root:

docker-compose -f docker-compose-local.yml up

Exposed ports:

posgtres: 5438

apireflector: Go to browser on http://localhost:6502

Required Kubernetes Annotations for Ingress

If you use an external service for proxying traffic into your Kubernetes clusters such as Azure Front Door or Cloudflare, you'll need to pass the following example annotation:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/upstream-vhost: reflector.example.com # <-- this one right here.