Change Command Argument to multiple arguments #6520
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2569
file.sh(see next lines) shows how arguments are passed to the pod
#!/bin/bash
while :
do
echo arg1 = $1 arg2 = $2
sleep 10
done
In UI create form the following entries are made
Run command: ./file.sh
Run command arguments: argument1 argument2 argument3
Before change:
POD log shows
arg1 = argument1 argument2 argument3 arg2 =
so all 3 arguments are passed as one argument
Deployment yaml shows(only container part)
spec:
containers:
- name: demo-arg-old
image: tcnthomas/arguments
command:
- ./file.sh
args:
- argument1 argument2 argument3
After change
POD log shows
arg1 = argument1 arg2 = argument2
First 2 arguments are shown as expected.
3rd argument is not shown as it is not part of the script
Deployment yaml shows(only container part)
spec:
containers:
- name: demo-arg-new
image: tcnthomas/arguments
command:
- ./file.sh
args:
- argument1
- argument2
- argument3