bo zhao created FLINK-28829:
-------------------------------

             Summary: [2] Need the ability of preparing K8S resource before 
JobManager creation
                 Key: FLINK-28829
                 URL: https://issues.apache.org/jira/browse/FLINK-28829
             Project: Flink
          Issue Type: Sub-task
          Components: Deployment / Kubernetes
            Reporter: bo zhao


For applying the customized schedulers functionality or making Flink K8S more 
flexible, we need to make Flink to provide an ability to prepare the K8S 
resource before we actually set up the Flink components.

In current Flink K8S design, it provides buildAccompanyingKubernetesResources 
interface to add the resources from decorators, the mentioned 
AccompanyingKubernetesResources will be created after the JobManager Deployment 
creation. But some K8S Pod-related customized schedulers might need an 
extension K8S resource to control the real scheduling before the target Pods 
setup. On the other hand, we only make an example about the customized 
scheduler which only worked before the Pod creation, we can not imagine all 
customized schedulers works like that, so we can make the existing JobManager 
deployment create processing more common.

 

New interface should be provided, and the decorators can create the K8S 
resource for associate them with the following Flink Pods, then using 
buildAccompanyingKubernetesResources to refresh the owner reference for keeping 
the same behavior like other AccompanyingKubernetesResources.

public interface KubernetesStepDecorator {

    FlinkPod decorateFlinkPod(FlinkPod flinkPod);

    List<HasMetadata> buildAccompanyingKubernetesResources() throws IOException;

    List<HasMetadata> [Pre K8S resource creation Interface]();

}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to