submarine icon indicating copy to clipboard operation
submarine copied to clipboard

SUBMARINE-976. Configure ingress routing for services across different namespaces

Open joshvictor1024 opened this issue 2 years ago • 4 comments

What is this PR for?

Configure Istio virtual service routing for submarine services across different namespaces.

For example, a submarine workbench created by submitting Submarine custom resource to k8s namespace submarine-user-test, can now only be connected to with host submarine-user-test.submarine as the destination e.g. via URL http://submarine-user-test.submarine.

To configure this, edit the newly added spec.virtualservice.hosts field of the submarine CR and spec.host of the virtual service will be set accordingly. For consistency, spec.gateways of the virtual service can now also be set through editing the submarine CR.

What type of PR is it?

Feature

Todos

  • [x] - update operator source file and artifact file
  • [x] - add e2e test cases
  • [x] - add new development doc

What is the Jira issue?

https://issues.apache.org/jira/browse/SUBMARINE-976

How should this be tested?

Follow submarine-cloud-v3/docs/developer-guide.md

Screenshots (if appropriate)

Questions:

  • Do the license files need updating? No
  • Are there breaking changes for older versions? Yes
  • Does this need new documentation? Yes

joshvictor1024 avatar Aug 09 '22 05:08 joshvictor1024

@joshvictor1024 Hi~ I fixed the check failure on the submarine-server. If you have time, can you resubmit to see if the error is still there? In the meantime, I would like to confirm if the changes in CR we can have in the test cases?

cdmikechen avatar Aug 21 '22 12:08 cdmikechen

Codecov Report

Merging #985 (5682b78) into master (e4df974) will increase coverage by 5.08%. The diff coverage is 67.50%.

@@             Coverage Diff              @@
##             master     #985      +/-   ##
============================================
+ Coverage      9.18%   14.26%   +5.08%     
- Complexity      670      991     +321     
============================================
  Files           234      241       +7     
  Lines         23716    23897     +181     
  Branches       3475     3473       -2     
============================================
+ Hits           2178     3410    +1232     
+ Misses        21407    20280    -1127     
- Partials        131      207      +76     
Impacted Files Coverage Δ
...ine/server/api/exception/InvalidSpecException.java 100.00% <ø> (+100.00%) :arrow_up:
...ache/submarine/server/manager/NotebookManager.java 0.00% <ø> (ø)
...submitter/k8s/model/pytorchjob/PyTorchJobSpec.java 100.00% <ø> (+100.00%) :arrow_up:
...ne/server/submitter/k8s/model/tfjob/TFJobSpec.java 100.00% <ø> (+100.00%) :arrow_up:
...erver/submitter/k8s/parser/NotebookSpecParser.java 79.69% <ø> (+79.69%) :arrow_up:
...a/org/apache/submarine/server/SubmarineServer.java 62.28% <20.00%> (-1.25%) :arrow_down:
...submarine/server/submitter/k8s/model/AgentPod.java 87.09% <50.00%> (+87.09%) :arrow_up:
.../submarine/server/rest/workbench/LoginRestApi.java 60.00% <57.14%> (+60.00%) :arrow_up:
...e/submarine/server/submitter/k8s/K8sSubmitter.java 38.07% <59.25%> (+38.07%) :arrow_up:
...marine/server/submitter/k8s/model/tfjob/TFJob.java 65.71% <61.29%> (+65.71%) :arrow_up:
... and 70 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 22 '22 02:08 codecov[bot]

@cdmikechen The check on submarine-server is passing now, thank you. For the changes in the CR, right now there are no test cases for them. I'll change the test cases to check whether the value of host of the virtual service is correct, for when spec.virtualservice.host is set or not set in submarine CR.

joshvictor1024 avatar Aug 22 '22 02:08 joshvictor1024

LGTM @pingsutw Can you help continue to review the code? So far Codecov doesn't seem to be scanning for operator/go related codes, and we may need to add that part as well later.

cdmikechen avatar Aug 23 '22 09:08 cdmikechen

LGTM

xunliu avatar Sep 13 '22 10:09 xunliu