Open 1grzyb1 opened 1 year ago
Proposal: This needs to be implemented in the agent, cli (and operator to support the new message), extensions (to modify the command line actually). I think it should be under a new feature in the configuration file, that lets user provide a regex to match arguments to use. It should also accept an optional parameter that tells us at what position of the command line to push this argument, for example:
{
"feature": {
"cmdline": {
"filter": "-D.+",
"position": 2
}
},
}
Now when remote has the cmdline
/app/user/java -Dfun=true -Dfun2=true -XXfun -jar fun.jar mainClass
Local that has the following cmdline:
/app/user/java -Dotherthing=1 -jar fun.jar mainClass
would be modified to
/app/user/java -Dotherthing=1 -Dfun=true -Dfun2=true -jar fun.jar mainClass
where /app/user/java
is arg number 1, -Dotherthing=1
is 2, then we extend there the additional arguments.
Notes:
We pass the configuration to our application inside pod containers through CLI arguments. So for example my container definition inside the pod will look like that:
So I would like those properties to be passed as cli arguments in the same order as in args to my local app just like env variables are passed