outposts: rename docker_image_base to container_image_base, since its not docker specific
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
0c55eea678
commit
5f9dda2e58
|
@ -54,7 +54,7 @@ outposts:
|
||||||
# %(type)s: Outpost type; proxy, ldap, etc
|
# %(type)s: Outpost type; proxy, ldap, etc
|
||||||
# %(version)s: Current version; 2021.4.1
|
# %(version)s: Current version; 2021.4.1
|
||||||
# %(build_hash)s: Build hash if you're running a beta version
|
# %(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
|
disable_update_check: false
|
||||||
avatars: env://AUTHENTIK_AUTHENTIK__AVATARS?gravatar
|
avatars: env://AUTHENTIK_AUTHENTIK__AVATARS?gravatar
|
||||||
|
|
|
@ -72,7 +72,7 @@ class BaseController:
|
||||||
if self.outpost.config.container_image is not None:
|
if self.outpost.config.container_image is not None:
|
||||||
return self.outpost.config.container_image
|
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 % {
|
return image_name_template % {
|
||||||
"type": self.outpost.type,
|
"type": self.outpost.type,
|
||||||
"version": __version__,
|
"version": __version__,
|
||||||
|
|
|
@ -92,7 +92,7 @@ class DockerController(BaseController):
|
||||||
|
|
||||||
def try_pull_image(self):
|
def try_pull_image(self):
|
||||||
"""Try to pull the image needed for this outpost based on the CONFIG
|
"""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()
|
image = self.get_container_image()
|
||||||
try:
|
try:
|
||||||
self.client.images.pull(image)
|
self.client.images.pull(image)
|
||||||
|
|
|
@ -206,7 +206,7 @@ REST_FRAMEWORK = {
|
||||||
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
|
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
|
||||||
"TEST_REQUEST_DEFAULT_FORMAT": "json",
|
"TEST_REQUEST_DEFAULT_FORMAT": "json",
|
||||||
"DEFAULT_THROTTLE_RATES": {
|
"DEFAULT_THROTTLE_RATES": {
|
||||||
"anon": '100/day',
|
"anon": "100/day",
|
||||||
"flow_executor": "100/day",
|
"flow_executor": "100/day",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ class PytestTestRunner: # pragma: no cover
|
||||||
CONFIG.y_set("authentik.avatars", "none")
|
CONFIG.y_set("authentik.avatars", "none")
|
||||||
CONFIG.y_set("authentik.geoip", "tests/GeoLite2-City-Test.mmdb")
|
CONFIG.y_set("authentik.geoip", "tests/GeoLite2-City-Test.mmdb")
|
||||||
CONFIG.y_set(
|
CONFIG.y_set(
|
||||||
"outposts.docker_image_base",
|
"outposts.container_image_base",
|
||||||
f"goauthentik.io/dev-%(type)s:{get_docker_tag()}",
|
f"goauthentik.io/dev-%(type)s:{get_docker_tag()}",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ class OutpostKubernetesTests(TestCase):
|
||||||
deployment_reconciler.get_reference_object(),
|
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):
|
with self.assertRaises(NeedsUpdate):
|
||||||
deployment_reconciler.reconcile(
|
deployment_reconciler.reconcile(
|
||||||
deployment_reconciler.retrieve(),
|
deployment_reconciler.retrieve(),
|
||||||
|
|
Reference in New Issue