Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Commit 98d809a

Browse files
authored
ref(scheduler): scheduler passes the kubernetes endpoint to resources instead of getting it from global settings (#1039)
1 parent cfe2f1c commit 98d809a

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

rootfs/scheduler/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __init__(self, url):
5050

5151
# get past recursion problems in case of self reference
5252
resource_mapping[component] = ''
53-
resource_mapping[component] = res()
53+
resource_mapping[component] = res(self.url)
5454
# map singular Resource name to the plural one
5555
resource_mapping[name] = component
5656
if res.short_name is not None:

rootfs/scheduler/resources/__resource.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from urllib.parse import urljoin
2-
from django.conf import settings
32
from .. import KubeHTTPClient
43

54

@@ -25,9 +24,6 @@ class Resource(KubeHTTPClient, metaclass=ResourceRegistry):
2524
api_prefix = 'api'
2625
short_name = None
2726

28-
def __init__(self):
29-
super().__init__(settings.SCHEDULER_URL)
30-
3127
def api(self, tmpl, *args):
3228
"""Return a fully-qualified Kubernetes API URL from a string template with args."""
3329
url = "/{}/{}".format(self.api_prefix, self.api_version) + tmpl.format(*args)

0 commit comments

Comments
 (0)