-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add k8s client wrapper and constants (#201)
- Loading branch information
Showing
14 changed files
with
1,941 additions
and
1,025 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
tesk.api.ga4gh package | ||
====================== | ||
|
||
Subpackages | ||
----------- | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
tesk.api.ga4gh.tes | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: tesk.api.ga4gh | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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,37 @@ | ||
tesk.api.ga4gh.tes package | ||
========================== | ||
|
||
Subpackages | ||
----------- | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
tesk.api.ga4gh.tes.service_info | ||
|
||
Submodules | ||
---------- | ||
|
||
tesk.api.ga4gh.tes.controllers module | ||
------------------------------------- | ||
|
||
.. automodule:: tesk.api.ga4gh.tes.controllers | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
tesk.api.ga4gh.tes.models module | ||
-------------------------------- | ||
|
||
.. automodule:: tesk.api.ga4gh.tes.models | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: tesk.api.ga4gh.tes | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
21 changes: 21 additions & 0 deletions
21
docs/source/pages/tesk/tesk.api.ga4gh.tes.service_info.rst
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,21 @@ | ||
tesk.api.ga4gh.tes.service\_info package | ||
======================================== | ||
|
||
Submodules | ||
---------- | ||
|
||
tesk.api.ga4gh.tes.service\_info.service\_info module | ||
----------------------------------------------------- | ||
|
||
.. automodule:: tesk.api.ga4gh.tes.service_info.service_info | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: tesk.api.ga4gh.tes.service_info | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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,18 @@ | ||
tesk.api package | ||
================ | ||
|
||
Subpackages | ||
----------- | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
tesk.api.ga4gh | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: tesk.api | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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,29 @@ | ||
tesk.k8s package | ||
================ | ||
|
||
Submodules | ||
---------- | ||
|
||
tesk.k8s.constants module | ||
------------------------- | ||
|
||
.. automodule:: tesk.k8s.constants | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
tesk.k8s.wrapper module | ||
----------------------- | ||
|
||
.. automodule:: tesk.k8s.wrapper | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: tesk.k8s | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
"""Tesk scoped constants.""" | ||
|
||
import os | ||
|
||
from pydantic import BaseModel | ||
|
||
|
||
class TeskConstants(BaseModel): | ||
"""Tesk's K8s scoped constants. | ||
Attributes: | ||
FILER_IMAGE_NAME: Name of the filer image | ||
FILER_IMAGE_VERSION: Version of the filer image | ||
TASKMASTER_IMAGE_NAME: Name of the taskmaster image | ||
TASKMASTER_IMAGE_VERSION: Version of the taskmaster image | ||
TESK_NAMESPACE: Namespace in which api will create K8s resources from TES | ||
request | ||
TASKMASTER_SERVICE_ACCOUNT_NAME: Taskmaster service account name | ||
TASKMASTER_ENVIRONMENT_EXECUTOR_BACKOFF_LIMIT: Backoff limit for taskmaster env | ||
FILER_BACKOFF_LIMIT: Backoff limit got filer job | ||
EXECUTOR_BACKOFF_LIMIT: Backoff limit for executor job | ||
Note: | ||
Below are the mentioned environment variable with which these constants can be | ||
configured, otherwise mentioned default will be assigned. | ||
variable: | ||
ENV_VARIABLE = default | ||
FILER_IMAGE_NAME: | ||
TESK_API_TASKMASTER_FILER_IMAGE_NAME = docker.io/elixircloud/tesk-core-filer | ||
FILER_IMAGE_VERSION: | ||
TESK_API_TASKMASTER_FILER_IMAGE_VERSION = latest | ||
TASKMASTER_IMAGE_NAME: | ||
TESK_API_TASKMASTER_IMAGE_NAME = docker.io/elixircloud/tesk-core-taskmaster | ||
TASKMASTER_IMAGE_VERSION: | ||
TESK_API_TASKMASTER_IMAGE_VERSION = latest | ||
TESK_NAMESPACE: | ||
TESK_API_K8S_NAMESPACE = tesk | ||
TASKMASTER_SERVICE_ACCOUNT_NAME: | ||
TESK_API_TASKMASTER_SERVICE_ACCOUNT_NAME = taskmaster | ||
TASKMASTER_ENVIRONMENT_EXECUTOR_BACKOFF_LIMIT: | ||
ENVIRONMENT_EXECUTOR_BACKOFF_LIMIT = 6 | ||
FILER_BACKOFF_LIMIT: | ||
FILER_BACKOFF_LIMIT = 2 | ||
EXECUTOR_BACKOFF_LIMIT: | ||
EXECUTOR_BACKOFF_LIMIT = 2 | ||
""" | ||
|
||
FILER_IMAGE_NAME: str = os.getenv( | ||
"TESK_API_TASKMASTER_FILER_IMAGE_NAME", "docker.io/elixircloud/tesk-core-filer" | ||
) | ||
FILER_IMAGE_VERSION: str = os.getenv( | ||
"TESK_API_TASKMASTER_FILER_IMAGE_VERSION", "latest" | ||
) | ||
TASKMASTER_IMAGE_NAME: str = os.getenv( | ||
"TESK_API_TASKMASTER_IMAGE_NAME", "docker.io/elixircloud/tesk-core-taskmaster" | ||
) | ||
TASKMASTER_IMAGE_VERSION: str = os.getenv( | ||
"TESK_API_TASKMASTER_IMAGE_VERSION", "latest" | ||
) | ||
TESK_NAMESPACE: str = os.getenv("TESK_API_K8S_NAMESPACE", "tesk") | ||
TASKMASTER_SERVICE_ACCOUNT_NAME: str = os.getenv( | ||
"TESK_API_TASKMASTER_SERVICE_ACCOUNT_NAME", "taskmaster" | ||
) | ||
TASKMASTER_ENVIRONMENT_EXECUTOR_BACKOFF_LIMIT: str = os.getenv( | ||
"ENVIRONMENT_EXECUTOR_BACKOFF_LIMIT", "6" | ||
) | ||
FILER_BACKOFF_LIMIT: str = os.getenv("FILER_BACKOFF_LIMIT", "2") | ||
EXECUTOR_BACKOFF_LIMIT: str = os.getenv("EXECUTOR_BACKOFF_LIMIT", "2") | ||
|
||
class Config: | ||
"""Configuration for class.""" | ||
|
||
frozen = True | ||
|
||
|
||
tesk_constants = TeskConstants() |
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 @@ | ||
"""Kubernetes API module for TESK.""" |
Oops, something went wrong.