-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app): experimental azure blob storage support (#1374)
- Loading branch information
Showing
25 changed files
with
834 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
from typing import TYPE_CHECKING | ||
from typing import Any, Dict, List, TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
from renku_notebooks.api.classes.server import UserServer | ||
from renku_notebooks.api.classes.cloud_storage import ICloudStorageRequest | ||
|
||
|
||
def main(server: "UserServer"): | ||
s3mount_patches = [] | ||
for i, s3mount in enumerate(server.cloudstorage): | ||
def main(server: "UserServer") -> List[Dict[str, Any]]: | ||
cloud_storage_patches: List[Dict[str, Any]] = [] | ||
cloud_storage_request: "ICloudStorageRequest" | ||
for i, cloud_storage_request in enumerate(server.cloudstorage): | ||
s3mount_name = f"{server.server_name}-ds-{i}" | ||
s3mount_patches.append( | ||
s3mount.get_manifest_patches( | ||
cloud_storage_patches.append( | ||
cloud_storage_request.get_manifest_patch( | ||
s3mount_name, server._k8s_client.preferred_namespace | ||
) | ||
) | ||
return s3mount_patches | ||
return cloud_storage_patches |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from abc import ABC, abstractmethod, abstractproperty | ||
from typing import Any, Dict | ||
|
||
|
||
class ICloudStorageRequest(ABC): | ||
@abstractproperty | ||
def exists(self) -> bool: | ||
pass | ||
|
||
@abstractproperty | ||
def mount_folder(self) -> str: | ||
pass | ||
|
||
@abstractproperty | ||
def bucket(self) -> str: | ||
pass | ||
|
||
@abstractmethod | ||
def get_manifest_patch( | ||
self, | ||
base_name: str, | ||
namespace: str, | ||
labels: Dict[str, str] = {}, | ||
annotations: Dict[str, str] = {}, | ||
) -> Dict[str, Any]: | ||
pass |
Oops, something went wrong.