-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Introduce REMOTING_OPTS
to pass arbitrary options to remoting on startup via an environment variable
#809
Conversation
…tup via an environment variable
REMOTING_OPTS
to pass arbitrary options to remoting on startup via an environment variable
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.
Should be decided what to do when both systems (command-line options, specific environment variables) are used and fail-fast accordingly.
I do not think we need to make it unnecessarily complicated; there is already too much code that tries to be clever this way, but Launcher
itself should detect inappropriate option combinations and produce appropriate error messages.
I would suggest moving the new option to the top of the description, and noting that it supersedes all prior options except for JAVA_BIN
and JAVA_OPTIONS
and that use of those is now deprecated.
Add system properties based switches to use the new mechanism To enable usage of REMOTING_OPTS -Dorg.csanchez.jenkins.plugins.kubernetes.PodTemplateBuilder.useRemotingOpts=true Enabling it requires all pod templates to use a version of agent with jenkinsci/docker-agent#809 in. Add extra REMOTING options -Dorg.csanchez.jenkins.plugins.kubernetes.PodTemplateBuilder.extraRemotingOpts="-noReconnectAfter 10m" Used this approach because there are migration challenges: * The remoting version must be recent enough to support REMOTING_OPTS * When overriding the JNLP container, the configuration form is generic, and part of REMOTING_OPTS is generated based on options defined in the cloud, so can't expose either an "extra remoting options" field, not use the `REMOTING_OPTS` environment variable.
#802 (comment)
This deprecates existing environment variables allowing to set options to
agent.jar
. Going forward, this will ease addition or removal of options toagent.jar
without impacting these launcher scripts.Testing done
Submitter checklist