Skip to content
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

chore(java): Add some default runtime flags for java 17 #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ class SpinnakerApplicationPlugin implements Plugin<Project> {
appConvention.applicationDistribution.from(project.file("config/${appName}.yml")) {
into('config')
}
appConvention.applicationDefaultJvmArgs << "-Djava.security.egd=file:/dev/./urandom"
appConvention.applicationDefaultJvmArgs << "-Djava.security.egd=file:/dev/./urandom" +
// Required for some google SDK behavior when loading certs as part of creds
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd really rather not do this. It's opening up holes that some folks don't need.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's... definitely more of a concern. We'd want to look but this right now impacts front50 and clouddriver. For any GCP communications. I'm open to other ideas on that - it's worth looking more if the google SDK has fixed this o NOT use the sun level APIs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting this in the individual repos that need it is better than putting it here.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This plugin seems to overwrite any repo-specific JVM args defined in the build file. Somewhat tricky to handle per-repo.

" --add-exports=java.base/sun.security.x509=ALL-UNNAMED" +
" --add-exports=java.base/sun.security.pkcs=ALL-UNNAMED" +
" --add-exports=java.base/sun.security.rsa=ALL-UNNAMED"

project.tasks.withType(CreateStartScripts) {
it.defaultJvmOpts = appConvention.applicationDefaultJvmArgs + ["-Dspring.config.import=optional:/opt/spinnaker/config/"]
Expand Down