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
DAG Workflow with Workflow resource #18827
DAG Workflow with Workflow resource #18827
Conversation
Labelling this PR as size/L |
GCE e2e test build/test passed for commit b6921209df7d370cc4102f3568fd2eb0d79bdd05. |
The author of this PR is not in the whitelist for merge, can one of the admins add the 'ok-to-merge' label? |
Note to myself: when I review this I need to first review the comments on #17787 |
The |
// If this value is nil, the default grace period will be used instead. | ||
// Set this value longer than the expected cleanup time for your workflow. | ||
// If downstream resources (job, pod, etc.) define their TerminationGracePeriodSeconds | ||
// the biggest is taken. |
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.
What does "the biggest is taken" mean? Are you saying this value is defaulted from the max value of TerminationGracePeriodSeconds of all contained objects?
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.
About ExistenceDependencies
(more generally about ObjectDependencies
). Sure #17305 is about existence but the specific behavior is going to be customized via the controller ControllerRef
(if I'm not wrong).
I would simply modify field name in ObjectDependencies
type ObjectDependencies {
...
DependenciesRef []ObjectReference `json:"dependenciesRef,omitempty"` // modified
ControllerRef *ObjectReference `json:"controllerRef,omitempty"`
...
}
and the ControllerRef
is going to be assigned to a controller that check termination of the resources in Dependencies
.
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.
About "the biggest is taken", yes, I'm going to rephrase it.
@erictune thanks for the review, I'm waiting for other feedbacks (if any) and then I'll modify this according to your comments. |
I did quick review, I'm planning to go through it once again later today. Sorry @sdminonne it's taking this long, my hands are pretty full already :/ |
@soltysh no problem :) thanks for the review. |
* As a user I want to be able to define a workflow. | ||
* As a user I want to compose workflows. | ||
* As a user I want to delete a workflow (eventually cascading to running _tasks_). | ||
* As a user I want to debug a workflow (ability to track failure). |
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.
How about more concrete examples such as: I want to create a Job B that should depend on Job A, etc. instead of giving these high level ones?
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
One more question, how one checks current state of a workflow, iow. which deps have been met already and which not? |
I'm missing in the proposal what happens when modification of a Workflow happens after it started, we've had a discussion on the topic on IRC. It would be beneficial for the proposal. |
Are you planning to extend kubectl in any way to simplify workflow management - if so please put it in the proposal as well. If none - state it as well. |
I assume you plan to implement a Workflow Controller in e.g. |
At the time of writing, to defer execution there are two discussions in the community: | ||
[#17305](https://github.com/kubernetes/kubernetes/pull/17305): an | ||
_initializer_ is a dynamically registered object which permits to select a custom controller | ||
to be applied to a resource. The controller verifies the dependencies. |
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 cannot tell if you are just pointing out the similarity to #17305 or if you are saying that Workflow will be implemented entirely via #17305, or that it will partly use #17305.
The WorkflowSpec has a nested JobSpec. Creating a nested object is not the same as creating a bare object. I don't see anything in #17305 about handling nested objects. Therefore, at a minimum, I think that there would need to be a Workflow Controller that extracts the nested objects and creates them as top-level objects. You could either have the Workflow Controller create them all immediately, and then use #17305 to sequence their start. Or you could just use the Workflow Controller to create each nested object (step) only when it is ready. I had assumed that you would do the latter, but rereading this section I'm not not sure what you intend to 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.
@erictune: I'm going to supply will contain the description of the controller. The controller won't use #17305 (even if mechanism could be similar, I argue), at the beginning I thought I could re-use the same mechanism or at least share some code. Unluckily I won't be able to work on both and apparently #17305 is taking longer. I'll remove any reference to #17305.
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.
Okay. Sounds good. Happy to revisit it when #17305 is done.
|
@erictune @soltysh I'm posting a new version. Several modifications:
|
77471d2
to
e8cf1dc
Compare
GCE e2e test build/test passed for commit e8cf1dc. |
GCE e2e test build/test passed for commit e8cf1dc. |
lgtm. minor comments that you can address later. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
@erictune thanks! |
@sdminonne @erictune @soltysh the proposal in this merged PR isn't found in the repo now. Is the thinking that this could be implemented outside of the core api using ThirdPartyResources? Thanks. |
@ravilr right. I'm implementing the controller using ThirdPartyResources as an external controller. |
Auto commit by PR queue bot
@erictune, @soltysh As discussed here. Here it is the workflow proposal with the
Workflow
resource. It should improve composability and scheduling. It's heavily based on @derekwaynecarr Initializers #17305 (for dependency resource).@bgrant0607, @mikedanese
@EricMountain-1A, @pmorie if you've some bandwidth