-
Notifications
You must be signed in to change notification settings - Fork 38
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
binary file via init #595
base: main
Are you sure you want to change the base?
binary file via init #595
Conversation
Yes nice approach. A solid step to close #383 as well. Dunno if we need to keep binaries and scenarios separate for sake of Warnet status or "missions" don't forget to run test in ci by adding to test.yml ! |
Also what if user wants to run multiple commands on a special binary? Like, deploy an application along with a script that runs it, or any case with multiple files ? |
whoops! thanks
They will have to build that themselves. Prob easiest to just write a dockerfile at that stage? |
|
||
options: | ||
| name | type | required | default | | ||
|-----------------|--------|------------|-----------| | ||
| scenario_file | Path | yes | | | ||
| additional_args | String | | | | ||
|
||
### `warnet run-binary` | ||
Run a file in warnet | ||
Pass `-- --help` to get individual scenario help |
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.
-- --help
is specific to Commander/test framework, might not apply to all binaries
BIG Concept ACK, light code review ack (haven't tested). Really like the initContainers approach , as this gives us a ton of flexibility in the future without needing to continually re-write our python code. It also gives a single place to manage things like putting the files in the correct directory, set the write permissions (as you're currently doing), and more all in a self contained unit that cleans up after itself. This allows the resulting image to be clean and just focus on "running the thing." Also very happy to see we are not base64'ing files into |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
args: | ||
- | | ||
echo "Waiting for binary file..." | ||
while [ ! -f /data/binary ]; do |
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.
If this wait was moved into the main container we wouldn't need the initContainer?
Is there another advantage to the init container?
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.
There is no other advantage, nice spot. This is just an artefact of me trying to migrate from configMap
and, instead of taking two steps forward, only taking one.
Removed the init container in effe95d
2ddb7fa
to
9b7c30a
Compare
Ruff failure but otherwise looks good. |
probably should launch a commander like this too really...