"""Custom configuration model for the FOCA app."""fromtypingimportDict,OptionalfrompydanticimportBaseModelfromtesk.api.ga4gh.tes.modelsimportServicefromtesk.constantsimporttesk_constants
[docs]classFtpConfig(BaseModel):"""Ftp configuration model for the TESK. Args: secretName: Name of the secret with FTP account credentials. enabled: If FTP account enabled (based on non-emptiness of secretName). """secretName:Optional[str]=Noneenabled:bool=False
[docs]classExecutorSecret(BaseModel):"""Executor secret configuration. Args: 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. """name:Optional[str]=NonemountPath:Optional[str]=Noneenabled:bool=False
[docs]classTaskmaster(BaseModel):"""Taskmaster's configuration model for the TESK. Args: 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 """imageName:str=tesk_constants.TASKMASTER_IMAGE_NAMEimageVersion:str=tesk_constants.TASKMASTER_IMAGE_VERSIONfilerImageName:str=tesk_constants.FILER_IMAGE_NAMEfilerImageVersion:str=tesk_constants.FILER_IMAGE_VERSIONftp:FtpConfig=FtpConfig()debug:bool=Falseenvironment:Optional[Dict[str,str]]=NoneserviceAccountName:str=tesk_constants.TASKMASTER_SERVICE_ACCOUNT_NAMEexecutorSecret:Optional[ExecutorSecret]=NonefilerBackoffLimit:str=tesk_constants.FILER_BACKOFF_LIMITexecutorBackoffLimit:str=tesk_constants.EXECUTOR_BACKOFF_LIMIT
[docs]classCustomConfig(BaseModel):"""Custom configuration model for the FOCA app. Args: service_info: Service information. taskmaster: Taskmaster environment. """# Define custom configuration fields hereservice_info:Servicetaskmaster:Taskmaster=Taskmaster()