pypz.deployers.k8s module
- exception pypz.deployers.k8s.DeploymentConflictException
Bases:
Exception
- exception pypz.deployers.k8s.DeploymentException
Bases:
Exception
- exception pypz.deployers.k8s.DeploymentNotFoundException
Bases:
Exception
- class pypz.deployers.k8s.KubernetesDeployer(namespace: str = 'default', configuration: Configuration = None, config_file: Any = None, verify_ssl: bool = True)
Bases:
Deployer- _abc_impl = <_abc._abc_data object>
- static _generate_pod_manifest_for(operator: KubernetesOperator, execution_mode: ExecutionMode) dict
- _retrieve_config_secret(pipeline_name: str) V1Secret | None
- _retrieve_operator_pod(operator_full_name: str) V1Pod | None
- _retrieve_operator_pods(pipeline_name: str) list[V1Pod]
- deploy(pipeline: Pipeline, execution_mode: ExecutionMode = ExecutionMode.Standard, ignore_operators: list[Operator] = None, wait: bool = True) None
Shall implement the logic to deploy a pipeline by its instance.
- Parameters:
pipeline – pipeline instance to be deployed
execution_mode – execution mode of the operators (check ExecutionMode for details)
ignore_operators – list of operator instance to be excluded from the deployment
wait – True - block until completion; False - don’t block until completion
- destroy(pipeline_name: str, force: bool = False, wait: bool = True) None
Shall implement the logic to destroy a pipeline by its name.
- Parameters:
pipeline_name – name of the deployed pipeline entity
force – True - kill without grace period; False - with grace period
wait – True - block until completion; False - don’t block until completion
- destroy_operator(operator_full_name: str, force: bool = False, wait: bool = True) None
Shall implement the logic to destroy a single operator by its name.
- Parameters:
operator_full_name – full name of the deployed operator
force – True - kill without grace period; False - with grace period
wait – True - block until completion; False - don’t block until completion
- is_deployed(pipeline_name: str) bool
Shall implement the logic to check, if a pipeline with the specified name has been deployed.
- Parameters:
pipeline_name – name of the pipeline to check
- Returns:
True, if deployed, False if not
- restart_operator(operator_full_name: str, force: bool = False, wait: bool = True)
Shall implement the logic to restart a single operator in a pipeline by its name. If the operator does not exist, it shall rather create it without throwing an exception.
- Parameters:
operator_full_name – full name of the deployed operator
force – True - kill without grace period; False - with grace period
wait – True - block until completion; False - don’t block until completion
- retrieve_deployed_pipeline(pipeline_name: str) Pipeline | None
Shall implement the logic to retrieve and create the deployed pipeline instance by its name.
- Parameters:
pipeline_name – name of the pipeline
- Returns:
Pipeline object, if existing, None if not existing
- retrieve_operator_logs(operator_full_name: str, **kwargs) str | None
Shall implement the logic to retrieve the logs from a deployed operator by its name.
- Parameters:
operator_full_name – full name of the deployed operator
- Returns:
operator logs as string
- retrieve_operator_state(operator_full_name: str) DeploymentState
Shall implement the logic to retrieve the state of a single operator by its name.
- Parameters:
operator_full_name – full name of the deployed operator
- Returns:
check DeploymentState for details
- retrieve_pipeline_deployments() set[str]
Shall implement the logic to get the names of all deployed pipelines.
- Returns:
set of names of the deployed pipelines