-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat: Introduce new MultiContainerRun function to run pods with two containers #3095
Conversation
There is an example in tests and docs.
|
31be024
to
32d48b2
Compare
7067c1e
to
ed6143f
Compare
Hi @hairyhum , |
ed6143f
to
8314e4a
Compare
The main goal of this change is to separate image management for databse dump blueprints. Not the performance. |
0a792a0
to
8dbc0e2
Compare
Renamed function into |
514f8b2
to
fdc0a1b
Compare
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.
Overall LGTM, but for me function name looks a bit misleading.
But, frankly, I can't propose better name. Maybe other reviewers will have an ideas ?
dda5d4d
to
f3b2e13
Compare
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.
LGTM
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.
looks good to me overall. just left some nit comments/formatting suggestion.
docs/functions.rst
Outdated
@@ -150,6 +150,82 @@ Example: | |||
- | | |||
echo "Example" | |||
|
|||
KubeTaskParallel |
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.
I think maybe we should the name of the function in next community call? It's good right now, but by reading the name it looks like in this function we are doing things parallelly that kubetask does sequentially, which doesn't seem to be the case right?
I think it doesn't necessarily have to have KubeTask in its name right? Maybe MultiContainerUpload
or something in that line?
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.
I was trying to avoid the "purpose" style names like "dump", "upload" or "export". While this function is used for that purpose it's deliberately made generic.
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.
ok, let's take opinions from other folks as well. @pavannd1 @PrasadG193 @mlavi .
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.
Somehow KubeTaskParallel
doesn't sound good to me. I agree that it would be better if we avoid KubeTask*
prefix for the new function.
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.
We can use MultiContainerPod
or MultiContainerRun
, but we already use KubeTaslk
instead of Pod
in the other function.
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.
I like MultiContainerRun
. Do we need to change the arguments name as well? that are currently named background and ouptut I think.
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.
Naming is hard. Okay with MultiContainerRun
or maybe MultiContainerJob
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.
I don't have better names than background
and output
for containers.
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.
I was thinking about the use of the named pipe - one of the containers pushes data while the other one receives it.
Here are some options I could think of:
input
andoutput
producer
andconsumer
writer
andreader
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.
I was thinking about the use of the named pipe - one of the containers pushes data while the other one receives it.
That is not a part of the function itself, but a part of the command. The only practical difference in the implementation of those containers is that only one of them sends its ouput into the function output. Otherwise you can make the output container wirte data to a file and you can make the background container read from the file.
`backgroundImage`, Yes, `string`, image to be used in "background" container | ||
`backgroundCommand`, Yes, `[]string`, command list to execute in "background" 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.
should we call this container snapshot or backup container? or maybe data container? just a suggestion, if you think background
is ok, I am good.
`outputImage`, Yes, `string`, image to be used in "output" container | ||
`outputCommand`, Yes, `[]string`, command list to execute in "output" 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.
should this be called upload 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.
Same note as a note before, trying to name things for what they do rather than what they can be used for.
releasenotes/notes/kube-task-parallel-function-d488516c0f3b22c6.yaml
Outdated
Show resolved
Hide resolved
6bcc499
to
19c31e8
Compare
Renamed function to `MultiContainerRun' |
a383df6
to
bf7017d
Compare
…ntainers In order to separate data dump generation by database tools and export by `kando`, a pod performing database dump can have two separate containers and set up the pipe over file instead of anonymous pipe
Init container can be used to set up data in the shared volume.
bf7017d
to
5938e47
Compare
Change Overview
In order to separate data dump generation by database tools and export by
kando
, a pod performing database dump can have two separate containers and set up the pipe over file instead of anonymous pipe.The goal of this function is to enable database-specific blueprints to use official database images separately from kanister-tools image instead of building a custom image for each databse blueprint.
Pull request type
Please check the type of change your PR introduces:
Issues
Test Plan