Skip to content

Commit 8d54bd9

Browse files
committed
[FLINK-36646][helm] Add required Java Opts to allow Java 17 based job images.
From Java 16 onwards, the project jigsaw java opts are now mandatory. To allow Java 17 based job images, we need to include the java opts from the flink dist base conf.yaml to the env.java.default-opts.all in the operator default flink-conf.yaml. These will be combined with any user supplied opts via env.java.opts.all and ignored by JDK 8 and 11 as we set -XX:IgnoreUnrecognizedVMOptions. Signed-off-by: Thomas Cooper <[email protected]>
1 parent 670bfcf commit 8d54bd9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

helm/flink-kubernetes-operator/conf/flink-conf.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
taskmanager.numberOfTaskSlots: 1
2121
parallelism.default: 1
2222

23+
# These parameters are required for Java 17 support.
24+
# These should be kept in-sync with the flink dist env.java.opts.all defaults in: flink-dist/src/main/resources/config.yaml
25+
# default-opts.all is used here so users can supply their own opts.all in their Job deployments and have these appended.
26+
env.java.default-opts.all: --add-exports=java.base/sun.net.util=ALL-UNNAMED --add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED
27+
2328
# Flink operator related configs
2429
# kubernetes.operator.reconcile.interval: 60 s
2530
# kubernetes.operator.reconcile.parallelism: 5

0 commit comments

Comments
 (0)