azagrebin commented on a change in pull request #11245:
URL: https://github.com/apache/flink/pull/11245#discussion_r438777643
##########
File path: docs/ops/deployment/kubernetes.md
##########
@@ -262,7 +262,7 @@ spec:
spec:
containers:
- name: jobmanager
- image: flink:{% if site.is_stable
%}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest{% endif %}
+ image: flink:{% if site.is_stable
%}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest # The
'latest' tag contains the latest released version of Flink for a specific Scala
version which will mismatch with your application over time.{% endif %}
Review comment:
This sounds fine for me to fix.
It just sounds now as if it `will` definitely mismatch, although it looks
like it `can` mismatch if not aligned with the image.
##########
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:
Sorry, I did not notice this before.
This text goes into the user docs. The Scala version used by the build will
be fixed in the user docs.
Therefore, It makes sense to require that the Scala version of the user
application and the image must be the same.
btw, when any option is changed, the contract now is to [rebuild the option
docs](https://github.com/apache/flink/tree/master/flink-docs#configuration-documentation).
This is why the CI fails.
I also think we do not usually highlight imperatives like `MUST` in user
docs for style reasons. It looks a bit like shooting...
----------------------------------------------------------------
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]