You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/10/19 05:30:03 UTC
[GitHub] [flink] wangyang0918 commented on a diff in pull request #20498: [FLINK-28829][k8s] Support prepreparing K8S resources before JM creation
wangyang0918 commented on code in PR #20498:
URL: https://github.com/apache/flink/pull/20498#discussion_r998952751
##########
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClientTest.java:
##########
@@ -630,4 +630,37 @@ private KubernetesConfigMap buildTestingConfigMap() {
.withData(data)
.build());
}
+
+ @Test
+ void testMockPrePreparedResources() throws Exception {
Review Comment:
The `throws Exception` is useless.
##########
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java:
##########
@@ -112,6 +112,10 @@ public Fabric8FlinkKubeClient(
public void createJobManagerComponent(KubernetesJobManagerSpecification kubernetesJMSpec) {
final Deployment deployment = kubernetesJMSpec.getDeployment();
final List<HasMetadata> accompanyingResources = kubernetesJMSpec.getAccompanyingResources();
+ final List<HasMetadata> prePreparedResources = kubernetesJMSpec.getPrePreparedResources();
+
+ // before create Deployment
+ this.internalClient.resourceList(prePreparedResources).createOrReplace();
Review Comment:
We might have resources leak here if the flink client crashed exactly after the pre-prepared resources created.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org