use of org.apache.flink.kubernetes.KubernetesClusterClientFactory in project flink by apache.
the class KubernetesJobManagerFactoryWithPodTemplateTest method getResultPod.
@Override
protected Pod getResultPod(FlinkPod podTemplate) throws Exception {
final KubernetesJobManagerParameters kubernetesJobManagerParameters = new KubernetesJobManagerParameters(flinkConfig, new KubernetesClusterClientFactory().getClusterSpecification(flinkConfig));
final KubernetesJobManagerSpecification kubernetesJobManagerSpecification = KubernetesJobManagerFactory.buildKubernetesJobManagerSpecification(podTemplate, kubernetesJobManagerParameters);
final PodTemplateSpec podTemplateSpec = kubernetesJobManagerSpecification.getDeployment().getSpec().getTemplate();
return new PodBuilder().withMetadata(podTemplateSpec.getMetadata()).withSpec(podTemplateSpec.getSpec()).build();
}
use of org.apache.flink.kubernetes.KubernetesClusterClientFactory in project flink by apache.
the class InitJobManagerDecoratorWithPodTemplateTest method getResultPod.
@Override
public FlinkPod getResultPod(FlinkPod podTemplate) {
final KubernetesJobManagerParameters kubernetesJobManagerParameters = new KubernetesJobManagerParameters(flinkConfig, new KubernetesClusterClientFactory().getClusterSpecification(flinkConfig));
final InitJobManagerDecorator initJobManagerDecorator = new InitJobManagerDecorator(kubernetesJobManagerParameters);
return initJobManagerDecorator.decorateFlinkPod(podTemplate);
}
Aggregations