Skip to content

Commit

Permalink
Make the use of the sidecar optional
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Jan 3, 2024
1 parent ad802d3 commit 2dc33eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions egi_notebooks_hub/d4science.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from oauthenticator.oauth2 import OAuthLoginHandler
from tornado import web
from tornado.httpclient import AsyncHTTPClient, HTTPError, HTTPRequest
from traitlets import Dict, List, Unicode
from traitlets import Bool, Dict, List, Unicode

D4SCIENCE_REGISTRY_BASE_URL = os.environ.get(
"D4SCIENCE_REGISTRY_BASE_URL",
Expand Down Expand Up @@ -250,6 +250,10 @@ class D4ScienceSpawner(KubeSpawner):
config=True,
help="""Frame ancestors for embedding the hub in d4science""",
)
use_sidecar = Bool(True,
config=True,
help="""Whether to use or not a sidecar for the workspace""",
)
sidecar_image = Unicode(
"eginotebooks/d4science-storage",
config=True,
Expand Down Expand Up @@ -460,7 +464,7 @@ async def pre_spawn_hook(self, spawner):
vre = context[context.rindex("/") + 1 :]
spawner.log.debug("VRE: %s", vre)
spawner.environment["VRE"] = vre
if token:
if token and self.use_sidecar:
spawner.extra_containers = [
{
"name": "workspace-sidecar",
Expand Down

0 comments on commit 2dc33eb

Please sign in to comment.