nielsbasjes commented on a change in pull request #11245:
URL: https://github.com/apache/flink/pull/11245#discussion_r443633064
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -137,11 +138,17 @@
.withDescription("The cluster-id, which should be no more than
45 characters, is used for identifying " +
"a unique Flink cluster. If not set, the client will
automatically generate it with a random ID.");
+ // The default container image that ties to the exact needed versions
of both Flink and Scala.
+ public static final String DEFAULT_CONTAINER_IMAGE = "flink:" +
EnvironmentInformation.getVersion() + "-scala_" +
EnvironmentInformation.getScalaVersion();
+
public static final ConfigOption<String> CONTAINER_IMAGE =
key("kubernetes.container.image")
.stringType()
- .defaultValue("flink:latest")
- .withDescription("Image to use for Flink containers.");
+ .defaultValue(DEFAULT_CONTAINER_IMAGE)
+ .withDescription("Image to use for Flink containers. " +
+ "The specified image MUST be based upon Apache Flink " +
+ EnvironmentInformation.getVersion() + " that uses Scala
" + EnvironmentInformation.getScalaVersion() + " . " +
Review comment:
When running on K8s the jobmanager needs the exact image name at runtime
to dynamically start new task workers. So the user application code does not
need the image name, the Flink infra running on K8s does need it at runtime.
So what you propose is to have the defaultValue be only used by the
documentation and the actual runtime default be calculated in a different
place? I would vote against this.
Making the way documentation is generated "obscure" (as I did in my last
patch) is less of an issue to me than making the actually used runtime code
"obscure".
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]