From 5f9dda2e58c84a78fbc1a66ad0140a7810dff6b5 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 14 Oct 2021 19:57:56 +0200 Subject: [PATCH] outposts: rename docker_image_base to container_image_base, since its not docker specific Signed-off-by: Jens Langhammer --- authentik/lib/default.yml | 2 +- authentik/outposts/controllers/base.py | 2 +- authentik/outposts/controllers/docker.py | 2 +- authentik/root/settings.py | 2 +- authentik/root/test_runner.py | 2 +- tests/integration/test_outpost_kubernetes.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/authentik/lib/default.yml b/authentik/lib/default.yml index 1ca3a0476..1f69174a9 100644 --- a/authentik/lib/default.yml +++ b/authentik/lib/default.yml @@ -54,7 +54,7 @@ outposts: # %(type)s: Outpost type; proxy, ldap, etc # %(version)s: Current version; 2021.4.1 # %(build_hash)s: Build hash if you're running a beta version - docker_image_base: "goauthentik.io/%(type)s:%(version)s" + container_image_base: env://AUTHENTIK_OUTPOSTS__DOCKER_IMAGE_BASE?goauthentik.io/%(type)s:%(version)s disable_update_check: false avatars: env://AUTHENTIK_AUTHENTIK__AVATARS?gravatar diff --git a/authentik/outposts/controllers/base.py b/authentik/outposts/controllers/base.py index 583b41f9e..6f00015dd 100644 --- a/authentik/outposts/controllers/base.py +++ b/authentik/outposts/controllers/base.py @@ -72,7 +72,7 @@ class BaseController: if self.outpost.config.container_image is not None: return self.outpost.config.container_image - image_name_template: str = CONFIG.y("outposts.docker_image_base") + image_name_template: str = CONFIG.y("outposts.container_image_base") return image_name_template % { "type": self.outpost.type, "version": __version__, diff --git a/authentik/outposts/controllers/docker.py b/authentik/outposts/controllers/docker.py index 59e3d7c5a..bfc83ff2b 100644 --- a/authentik/outposts/controllers/docker.py +++ b/authentik/outposts/controllers/docker.py @@ -92,7 +92,7 @@ class DockerController(BaseController): def try_pull_image(self): """Try to pull the image needed for this outpost based on the CONFIG - `outposts.docker_image_base`, but fall back to known-good images""" + `outposts.container_image_base`, but fall back to known-good images""" image = self.get_container_image() try: self.client.images.pull(image) diff --git a/authentik/root/settings.py b/authentik/root/settings.py index 595abc4eb..cf60e7c37 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -206,7 +206,7 @@ REST_FRAMEWORK = { "DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema", "TEST_REQUEST_DEFAULT_FORMAT": "json", "DEFAULT_THROTTLE_RATES": { - "anon": '100/day', + "anon": "100/day", "flow_executor": "100/day", }, } diff --git a/authentik/root/test_runner.py b/authentik/root/test_runner.py index d12a0e151..459bb4b64 100644 --- a/authentik/root/test_runner.py +++ b/authentik/root/test_runner.py @@ -17,7 +17,7 @@ class PytestTestRunner: # pragma: no cover CONFIG.y_set("authentik.avatars", "none") CONFIG.y_set("authentik.geoip", "tests/GeoLite2-City-Test.mmdb") CONFIG.y_set( - "outposts.docker_image_base", + "outposts.container_image_base", f"goauthentik.io/dev-%(type)s:{get_docker_tag()}", ) diff --git a/tests/integration/test_outpost_kubernetes.py b/tests/integration/test_outpost_kubernetes.py index c9000ede8..6ef8ea2c8 100644 --- a/tests/integration/test_outpost_kubernetes.py +++ b/tests/integration/test_outpost_kubernetes.py @@ -50,7 +50,7 @@ class OutpostKubernetesTests(TestCase): deployment_reconciler.get_reference_object(), ) - with CONFIG.patch("outposts.docker_image_base", "test"): + with CONFIG.patch("outposts.container_image_base", "test"): with self.assertRaises(NeedsUpdate): deployment_reconciler.reconcile( deployment_reconciler.retrieve(),