kubeflow / common

Common APIs and libraries shared by other Kubeflow operator repositories.
Apache License 2.0
51 stars 73 forks source link

Make ports more flexiable for customizations #131

Closed xieydd closed 3 years ago

xieydd commented 3 years ago

Signed-off-by: xieydd chrisydxie@tencent.com Try to resolve issue #122 . This has been tested with tf-operator.

# tf-job
Worker:
  template:
    spec:
      ports:
      - name: test
        containerPort: 80

# worker svc
spec:
  clusterIP: None
  ports:
  - name: test
    port: 80
    protocol: TCP
    targetPort: 80
  - name: tfjob-port
    port: 2222
    protocol: TCP
    targetPort: 2222
  selector:
    group-name: kubeflow.org
    job-name: dist-mnist-for-e2e-test
    replica-index: "0"
    replica-type: ps
  sessionAffinity: None
  type: ClusterIP
Jeffwan commented 3 years ago

Looks straight forward. @gaocegege please have another look

/approve

google-oss-robot commented 3 years ago

[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: - ~~[OWNERS](https://github.com/kubeflow/common/blob/master/OWNERS)~~ [Jeffwan,terrytangyuan] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
Jeffwan commented 3 years ago

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?

xieydd commented 3 years ago

Add test case make sense, i will add it.