tesk package¶
Subpackages¶
- tesk.api package
- tesk.k8s package
- Submodules
- tesk.k8s.constants module
AnnotationConstantsFTPConstantsJobConstantsJobConstants.RESOURCE_DISK_DEFAULTJobConstants.COMPLETED_STATESJobConstants.ConfigJobConstants.EXECUTOR_BACKOFF_LIMITJobConstants.FILER_BACKOFF_LIMITJobConstants.JOB_CREATE_ATTEMPTS_NOJobConstants.JOB_NAME_EXEC_NO_LENGTHJobConstants.JOB_NAME_EXEC_PREFIXJobConstants.JOB_NAME_FILER_SUFJobConstants.JOB_NAME_TASKM_PREFIXJobConstants.JOB_NAME_TASKM_RAND_PART_LENGTHJobConstants.RESOURCE_DISK_DEFAULTJobConstants.TASKMASTER_INPUTJobConstants.TASKMASTER_INPUT_EXEC_KEYJobConstants.VOLUME_NAME
K8sConstantsLabelConstantsLabelConstants.ConfigLabelConstants.LABEL_EXECNO_KEYLabelConstants.LABEL_GROUPNAME_KEYLabelConstants.LABEL_JOBTYPE_KEYLabelConstants.LABEL_JOBTYPE_VALUE_EXECLabelConstants.LABEL_JOBTYPE_VALUE_TASKMLabelConstants.LABEL_TASKSTATE_KEYLabelConstants.LABEL_TASKSTATE_VALUE_CANCLabelConstants.LABEL_TESTASK_ID_KEYLabelConstants.LABEL_USERID_KEY
PatchConstantsPathValidationConstantsTeskK8sConstantsTeskK8sConstants.job_constantsTeskK8sConstants.annotation_constantsTeskK8sConstants.label_constantsTeskK8sConstants.path_validation_constantsTeskK8sConstants.ftp_constantsTeskK8sConstants.patch_constantsTeskK8sConstants.k8s_constantsTeskK8sConstants.ConfigTeskK8sConstants.annotation_constantsTeskK8sConstants.ftp_constantsTeskK8sConstants.job_constantsTeskK8sConstants.k8s_constantsTeskK8sConstants.label_constantsTeskK8sConstants.patch_constantsTeskK8sConstants.path_validation_constants
- tesk.k8s.wrapper module
KubernetesClientWrapperKubernetesClientWrapper.create_config_map()KubernetesClientWrapper.create_job()KubernetesClientWrapper.get_single_task_output_filer_job()KubernetesClientWrapper.label_job_as_cancelled()KubernetesClientWrapper.label_pod_as_cancelled()KubernetesClientWrapper.list_all_filer_jobs()KubernetesClientWrapper.list_all_job_pods()KubernetesClientWrapper.list_all_task_executor_jobs()KubernetesClientWrapper.list_all_taskmaster_jobs()KubernetesClientWrapper.list_all_taskmaster_jobs_for_user()KubernetesClientWrapper.list_jobs()KubernetesClientWrapper.list_limits()KubernetesClientWrapper.list_single_job_pods()KubernetesClientWrapper.list_single_task_executor_jobs()KubernetesClientWrapper.minimum_ram_gb()KubernetesClientWrapper.quantity_to_bytes()KubernetesClientWrapper.read_pod_log()KubernetesClientWrapper.read_taskmaster_job()
- Module contents
- tesk.services package
- Submodules
- tesk.services.constants module
- tesk.services.exceptions module
FileProtocolDisabledInvalidHostPathServiceStatusCodesServiceStatusCodes.BAD_REQUESTServiceStatusCodes.CONFLICTServiceStatusCodes.CREATEDServiceStatusCodes.FORBIDDENServiceStatusCodes.GATEWAY_TIMEOUTServiceStatusCodes.INTERNAL_SERVER_ERRORServiceStatusCodes.NOT_FOUNDServiceStatusCodes.NOT_IMPLEMENTEDServiceStatusCodes.OKServiceStatusCodes.REDIRECTServiceStatusCodes.SERVICE_UNAVAILABLEServiceStatusCodes.UNAUTHORIZEDServiceStatusCodes.get()
UnknownProtocol
- tesk.services.filer module
- tesk.services.filer_class module
- tesk.services.filer_s3 module
- tesk.services.job module
- tesk.services.path module
- tesk.services.pvc module
- tesk.services.taskmaster module
- tesk.services.transput module
- tesk.services.utils module
- Module contents
Submodules¶
tesk.app module¶
API server entry point.
- tesk.app.init_app()[source]¶
Initialize and return the FOCA app.
This function initializes the FOCA app by loading the configuration from the environment variable TESK_FOCA_CONFIG_PATH if set, or from the default path if not. It raises a FileNotFoundError if the configuration file is not found.
- Return type:
FlaskApp- Returns:
A Connexion application instance.
- Raises:
FileNotFoundError – If the configuration file is not found.
tesk.constants module¶
Tesk scoped constants.
- class tesk.constants.TeskConstants(**data)[source]¶
Bases:
BaseModelTesk’s K8s scoped constants.
- 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
-
EXECUTOR_BACKOFF_LIMIT:
str¶
-
FILER_BACKOFF_LIMIT:
str¶
-
FILER_IMAGE_NAME:
str¶
-
FILER_IMAGE_VERSION:
str¶
-
TASKMASTER_IMAGE_NAME:
str¶
-
TASKMASTER_IMAGE_VERSION:
str¶
-
TASKMASTER_SERVICE_ACCOUNT_NAME:
str¶
-
TESK_NAMESPACE:
str¶
tesk.custom_config module¶
Custom configuration model for the FOCA app.
- class tesk.custom_config.CustomConfig(**data)[source]¶
Bases:
BaseModelCustom configuration model for the FOCA app.
- Parameters:
service_info – Service information.
taskmaster – Taskmaster environment.
-
taskmaster:
Taskmaster¶
- class tesk.custom_config.ExecutorSecret(**data)[source]¶
Bases:
BaseModelExecutor secret configuration.
- Parameters:
name – Name of a secret that will be mounted as volume to each executor. The same name will be used for the secret and the volume.
mountPath – The path where the secret will be mounted to executors.
enabled – Indicates whether the secret is enabled.
-
enabled:
bool¶
-
mountPath:
Optional[str]¶
-
name:
Optional[str]¶
- class tesk.custom_config.FtpConfig(**data)[source]¶
Bases:
BaseModelFtp configuration model for the TESK.
- Parameters:
secretName – Name of the secret with FTP account credentials.
enabled – If FTP account enabled (based on non-emptiness of secretName).
-
enabled:
bool¶
-
secretName:
Optional[str]¶
- class tesk.custom_config.Taskmaster(**data)[source]¶
Bases:
BaseModelTaskmaster’s configuration model for the TESK.
- Parameters:
imageName – Taskmaster image name.
imageVersion – Taskmaster image version.
filerImageName – Filer image name.
filerImageVersion – Filer image version.
ftp – FTP account settings.
debug – If verbose (debug) mode of taskmaster is on (passes additional flag to taskmaster and sets image pull policy to Always).
environment – Environment variables, that will be passed to taskmaster.
serviceAccountName – Service Account name for taskmaster.
executorSecret – Executor secret configuration
-
debug:
bool¶
-
environment:
Optional[Dict[str,str]]¶
-
executorBackoffLimit:
str¶
-
executorSecret:
Optional[ExecutorSecret]¶
-
filerBackoffLimit:
str¶
-
filerImageName:
str¶
-
filerImageVersion:
str¶
-
imageName:
str¶
-
imageVersion:
str¶
-
serviceAccountName:
str¶
tesk.exceptions module¶
App exceptions.
- exception tesk.exceptions.ConfigInvalidError[source]¶
Bases:
ValueErrorConfiguration file is invalid.
- exception tesk.exceptions.ConfigNotFoundError[source]¶
Bases:
FileNotFoundErrorConfiguration file not found error.
tesk.utils module¶
Utility functions for the TESK package.
- tesk.utils.get_config_path()[source]¶
Get the configuration path.
- Return type:
Path- Returns:
The path of the config file.
- tesk.utils.get_custom_config()[source]¶
Get the custom configuration.
- Return type:
- Returns:
The custom configuration.
Module contents¶
TESK package initialization file.