outposts: fix defaults and tests for outposts
This commit is contained in:
@ -20,8 +20,9 @@ class BaseController:
|
||||
outpost: Outpost
|
||||
connection: OutpostServiceConnection
|
||||
|
||||
def __init__(self, outpost: Outpost):
|
||||
def __init__(self, outpost: Outpost, connection: OutpostServiceConnection):
|
||||
self.outpost = outpost
|
||||
self.connection = connection
|
||||
self.logger = get_logger()
|
||||
self.deployment_ports = {}
|
||||
|
||||
|
||||
@ -23,8 +23,8 @@ class DockerController(BaseController):
|
||||
|
||||
image_base = "beryju/passbook"
|
||||
|
||||
def __init__(self, outpost: Outpost) -> None:
|
||||
super().__init__(outpost)
|
||||
def __init__(self, outpost: Outpost, connection: DockerServiceConnection) -> None:
|
||||
super().__init__(outpost, connection)
|
||||
try:
|
||||
if self.connection.local:
|
||||
self.client = DockerClient.from_env()
|
||||
|
||||
@ -25,8 +25,10 @@ class KubernetesController(BaseController):
|
||||
|
||||
connection: KubernetesServiceConnection
|
||||
|
||||
def __init__(self, outpost: Outpost) -> None:
|
||||
super().__init__(outpost)
|
||||
def __init__(
|
||||
self, outpost: Outpost, connection: KubernetesServiceConnection
|
||||
) -> None:
|
||||
super().__init__(outpost, connection)
|
||||
try:
|
||||
if self.connection.local:
|
||||
load_incluster_config()
|
||||
|
||||
Reference in New Issue
Block a user