osm
osm copied to clipboard
demo: script to set up vanilla multicluster env
Description:
Add a script to set up a demo multicluster environment for OSM development.
It deploys the sample bookstore application on cluster c1 and c2. C2 exports its bookstore service via ServiceExport
and c1 imports it via ServiceImport
. A new EndpointSlice
resource on c1 is created to store accessible endpoint from c2.
The steps listed in the script are:
- Setup CRDs
- Deploy applications
- Create
ServiceExport
in c2 - Create
ServiceImport
in c1. It will have a ClusterSetIP - Expose bookstore on c2 and get service public IP
- On c1, create
EndpointSlice
containing the remote service IP - (optional) update coreDNS entries of domain
bookstore.bookstore.svc.clusterset.local
Partially resolves #4974
Testing done:
Script is tested by executing with 2 clusters.
The end result of running the script:
- [c1] Created ServiceImport with MultiClusterService IP
- [c1] Created EndpointSlice with public service IP from c2
- [c2] Created ServiceExport
Affected area:
Functional Area | |
---|---|
Demo | [x] |
Please answer the following questions with yes/no.
- Does this change contain code from or inspired by another project?
- Did you notify the maintainers and provide attribution? No.
The demo is inspired by mcs-api
- Is this a breaking change?
No
- Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)?
No
Codecov Report
Merging #4985 (e306ac1) into main (39b7ad5) will increase coverage by
0.33%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## main #4985 +/- ##
==========================================
+ Coverage 68.40% 68.74% +0.33%
==========================================
Files 218 217 -1
Lines 15844 15849 +5
==========================================
+ Hits 10838 10895 +57
+ Misses 4951 4897 -54
- Partials 55 57 +2
Flag | Coverage Δ | |
---|---|---|
unittests | 68.74% <ø> (+0.33%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
pkg/debugger/mock_debugger_generated.go | 67.74% <0.00%> (-10.04%) |
:arrow_down: |
pkg/certificate/certificate.go | 90.24% <0.00%> (-4.63%) |
:arrow_down: |
pkg/debugger/certificate.go | 85.71% <0.00%> (-3.76%) |
:arrow_down: |
pkg/utils/mtls.go | 100.00% <0.00%> (ø) |
|
pkg/debugger/server.go | 100.00% <0.00%> (ø) |
|
pkg/k8s/events/types.go | 72.34% <0.00%> (ø) |
|
pkg/envoy/eds/cluster_load_assignment.go | ||
pkg/smi/health.go | ||
pkg/envoy/eds/builder.go | 76.92% <0.00%> (ø) |
|
cmd/osm-controller/osm-controller.go | 16.94% <0.00%> (+0.14%) |
:arrow_up: |
... and 6 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
FYI I executed the script with c1 and c2 deployed on same subnet without OSM installed, c1 bookbuyer cannot access c2 bookstore by ClusterIP. But c1 bookbuyer can access c2 bookstore by:
- c2 bookstore endpoint's pod IP
- OR c2 bookstore external IP (if exposed)
With OSM installed, c1 cannot access c2 services due to failed mTLS authn.
With OSM installed, c1 cannot access c2 services due to failed mTLS authn.
Is it possible to make them talk with OSM installed?
Maybe a readme could be helpful for things like: what the configuration of the two clusters was (kind/aks) and was there additional components installed (Submariner)?