-
Notifications
You must be signed in to change notification settings - Fork 35
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 DevfileOptions to GetPodTemplateSpec #167
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #167 +/- ##
==========================================
+ Coverage 60.41% 60.47% +0.05%
==========================================
Files 36 37 +1
Lines 4229 4369 +140
==========================================
+ Hits 2555 2642 +87
- Misses 1525 1567 +42
- Partials 149 160 +11
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Philippe Martin <phmartin@redhat.com>
561a872
to
4c562a1
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.
Can we update the copyright year in the generators file to 2022-2023
pkg/devfile/generator/generators.go
Outdated
@@ -238,6 +238,7 @@ func GetDeployment(devfileObj parser.DevfileObj, deployParams DeploymentParams) | |||
// PodTemplateParams is a struct that contains the required data to create a podtemplatespec object | |||
type PodTemplateParams struct { | |||
ObjectMeta metav1.ObjectMeta | |||
options common.DevfileOptions |
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 options
only intended to be used within the generator package and that's why it's private?
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.
No, it should be public. Thanks for the catch
pkg/devfile/generator/generators.go
Outdated
func GetPodTemplateSpec(devfileObj parser.DevfileObj, podTemplateParams PodTemplateParams) (*corev1.PodTemplateSpec, error) { | ||
containers, err := GetContainers(devfileObj, common.DevfileOptions{}) | ||
containers, err := GetContainers(devfileObj, podTemplateParams.options) |
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.
Can we get additional test coverage for this?
Signed-off-by: Philippe Martin <phmartin@redhat.com>
ac38a51
to
0af08e8
Compare
Thanks @kim-tsao for your review |
Signed-off-by: Philippe Martin <phmartin@redhat.com>
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.
Thanks @feloy , the changes look good
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feloy, kim-tsao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What does this PR do?:
The PR adds the ability to filter the containers included in the
generator.PodTemplateSpec()
when calling GetPodTemplateSpec. This is equivalent to filtering when callingGetContainers()
PR acceptance criteria:
Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened.
Unit/Functional tests
QE Integration test
Documentation
Client Impact
Gosec scans
How to test changes / Special notes to the reviewer: