-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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(controller): support volumeClaimTemplates can be referenced by templateRef. Fixes #13977 #7444 #14056
base: main
Are you sure you want to change the base?
Conversation
96834e2
to
a5f9fcc
Compare
looks good. please resolve conflicts! |
a5f9fcc
to
09eb023
Compare
09eb023
to
059bc26
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.
Is there any limit on how many times createPVCs()
will be called, it looks like it will be called repeatedly.
} | ||
} | ||
if len(vols) > 0 { | ||
woc.execWf.Spec.VolumeClaimTemplates = append(woc.execWf.Spec.VolumeClaimTemplates, vols...) |
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.
execWf.Spec should be considered immutable (constant), this isn't good practice.
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, I might be able to put this part of the logic inside setExecWorkflow(ctx context.Context)
, and reserve all the PVCs when initializing execWf.
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.
argo-workflows/workflow/controller/operator.go
Lines 148 to 150 in 581950f
// NEVER modify objects from the store. It's a read-only, local cache. | |
// You can use DeepCopy() to make a deep copy of original object and modify this copy | |
// Or create a copy manually for better performance |
execWf
is a copy, modifying execWf
is not good practice, but is this a feasible solution?
argo-workflows/workflow/controller/operator.go Lines 1682 to 1692 in 89d75a6
|
Hey 🙂 Anything still blocking this feature? We are patiently waiting especially for this with the use case of starting multiple Workflow Templates (each having it's own volume) using Currently we are forced to declare single big volume at the Workflow level which is quite inconvenient then to share it with multiple concurrent child templates. Thanks! |
9d96d11
to
d605a54
Compare
…mplateRef Signed-off-by: joey <[email protected]>
d605a54
to
efb52d4
Compare
Fixes #13977 #7444
Motivation
In order for volumeClaimTemplates to be referenced by the
templateRef
The purpose is to automatically bring the corresponding volumeClaimTemplates into the current workflow when using
templateRef
.Modifications
template
Verification
e2e test