-
Notifications
You must be signed in to change notification settings - Fork 152
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
Add support for overriding default pod specs #307
Conversation
603e357
to
81296b7
Compare
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
81296b7
to
633233f
Compare
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
ServiceAccountName: opts.ServiceAccountName, | ||
} | ||
// Override default specs if podspecs are passed | ||
if !reflect.DeepEqual(opts.PodOverride, v1.PodSpec{}) { |
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.
rather than repeat this check in each function, can we push this logic down into PodSpecOverride
?
Merging this PR, we can work on the review requests in a new PR. |
@@ -133,3 +151,18 @@ func WaitForPodCompletion(ctx context.Context, cli kubernetes.Interface, namespa | |||
}) | |||
return errors.Wrap(err, "Pod did not transition into complete state") | |||
} | |||
|
|||
// PodSpecOverride override default pod Spec with the ones provided via specs | |||
func PodSpecOverride(ctx context.Context, defaultSpecs, overrideSpecs v1.PodSpec) (v1.PodSpec, error) { |
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 am confused about what the semantics (expected behavior) for this function are. It is not clear from the documentation.
- From whatever I can infer (really guess), it is not clear that the implementation below achieves that.
- Is there test coverage for this function?
Change Overview
This PR adds support for overriding default pod specs using blueprint args and actionset fields
Usage:
Pod spec overriding with Blueprint args:
Pod spec overriding with Actionset fields:
Pull request type
Please check the type of change your PR introduces:
Issues
Test Plan