-
Notifications
You must be signed in to change notification settings - Fork 498
[FLINK-36646][helm] Add required Java Opts to allow Java 17 based job images #915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-36646][helm] Add required Java Opts to allow Java 17 based job images #915
Conversation
|
One question I had was how to ensure these opts stay in sync with the upstream Flink Distribution's opts? Should we add a script to sync them with a tagged release from the main repo? Or would documenting the need to sync them be enough? |
92517f3 to
8d54bd9
Compare
Whats does the upgrade story look like for users who have already manually configured things so to run a java17 image? How does java handle duplicate instances of I guess in theory the set of exports needs to evolve with each Flink version right? So does that mean the operator needs to support different sets for different versions of Flink? That might be a more theoretical concern given the use of This is mostly just a question from ignorance of how modules work, but if we add
I think we should just merge #910 into this PR, it doesn't really add any value on its own. |
|
Thanks @SamBarker, using the Your question about differences in option sets between Flink versions is a good one and needs to be addressed. The module opts haven't changed since they were added, but that doesn't mean they won't and it is conceivable that some export/open opts will be removed in later versions that are required in earlier versions. We could do some munging of the options in the helm template (selecting them based on the configured I think @robobario's suggestion, in the JIRA issue, of the individual Flink distribution setting these is probably the long-term solution. I will have a look at that next, in the meantime I will pull #910 into this to confirm it works for all versions. I will leave this PR up to see if anyone else has opinions. It is a short term fix until the Java 17 opts issue addressed in the main distribution or the opts change in a future Flink version. |
|
While I dig into the Flink distribution java settings, I switched the opts in the default helm config to be version specific. So at least we can have different opts for different versions. But we still need to copy and paste these from the Flink dist's conf. |
gyfora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as the e2es pass, good to go from my side
|
Test failure is When using v18 with jdk 17 |
|
I don't see |
|
Thanks @SamBarker and good spot @robobario. I have updated 1.18 to use the @gyfora Hopefully that will get the e2e tests to pass. Are the docs in the appropriate section? |
|
@tomncooper looks good, could you please organize the commits into 2 distinct commits if you want to keep your work from @SamBarker 's separately so I can merge it that way? Alternatively I can squash the whole thing during merge |
… 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 per-flink-version env.java.default-opts.all config 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]>
fa92cbc to
94d13cd
Compare
|
@gyfora That should be ready to go now. |
What is the purpose of the change
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 distribution's base
conf.yamlin the operator's helm defaultflink-conf.yaml.The options are added under the
kubernetes.operator.default-configuration.flink-version.<flink-version>.env.java.default-opts.allconfig option as these will be combined with any user supplied opts (viaenv.java.opts.allin theFlinkDeploymentCR) and ignored by JDK 8 and 11 based images as we set-XX:IgnoreUnrecognizedVMOptions.For Flink 1.18, the
env.java.default-opts.alloption doesn't exist, so I have usedenv.java.opts.all. However, this means any user adding their own opts will override the ones from the helm config and they will need to include them manually. I have added docs to highlight this.I have tested these settings with the
flink:<flink-version>-scala_2.12-java<java-version>images with Flink [1.18.1, 1.19.1, 1.20.0] and Java [8, 11, 17].Note: If FLINK-36529 is added, which allows a
<flink-version>+syntax, we can reduce the verbosity of the config file entries and just usev1.19+.env.java.default-opts.alluntil such time as a future version changes the opts.Brief change log
Added java opts from the Flink distributions default conf.yaml to the Operators helm default
flink-conf.yaml.Verifying this change
This change is verified by running the test matrix proposed in #910 (cherry picked into this PR branch).
Does this pull request potentially affect one of the following parts:
CustomResourceDescriptors: noDocumentation