-
Notifications
You must be signed in to change notification settings - Fork 73
Make ports more flexiable for customizations #131
Conversation
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.
There is no need to make the map a pointer, I think.
pkg/controller.v1/common/service.go
Outdated
return nil, nil | ||
} | ||
// GetPortsFromJob gets the ports of job container. Port could be nil, if distributed communication strategy doesn't need and no other ports that need to be exposed. | ||
func (jc *JobController) GetPortsFromJob(spec *apiv1.ReplicaSpec) (*map[string]int32, 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.
func (jc *JobController) GetPortsFromJob(spec *apiv1.ReplicaSpec) (*map[string]int32, error) { | |
func (jc *JobController) GetPortsFromJob(spec *apiv1.ReplicaSpec) (map[string]int32, 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.
Yep, you are right.
Looks straight forward. @gaocegege please have another look /approve |
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. Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Jeffwan, terrytangyuan, xieydd 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 |
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.
The code LGTM, should we add some test cases?
I think test_job can be updated for testing purpose. @xieydd Can you help take a look? |
Add test case make sense, i will add it. |
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
Co-authored-by: Paul Angerer <dabauxi@users.noreply.github.com>
Signed-off-by: xieydd chrisydxie@tencent.com
Try to resolve issue #122 .
This has been tested with tf-operator.