Skip to content

Commit

Permalink
update service sync (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwright authored Sep 2, 2024
1 parent 26bf4af commit 66a78e7
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 24 deletions.
24 changes: 0 additions & 24 deletions cli/service-sync.adoc

This file was deleted.

4 changes: 4 additions & 0 deletions kubernetes/deployment-concerns.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This guide focusses on the following goals:

* xref:increased-traffic[]
* xref:high-availability[]
* xref:service-sync[]
// Type:procedure
[id="increased-traffic"]
Expand Down Expand Up @@ -101,3 +102,6 @@ data:
Setting the number of routers to more than two does not provide increased availability and can adversely affect performance.

Note: Clients must reconnect when a router restarts or traffic is redirected to a backup router.


include::service-sync.adoc[leveloffset=+1]
58 changes: 58 additions & 0 deletions kubernetes/service-sync.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Type: reference
[id="service-sync"]
= Service synchronization

By default, creating a site enables that site to synchronize all services from other default sites.
This means that all services exposed on the service network are available in the current site.
For example, if you expose the backend service in the `east` site, that service is automatically created in the `west` site.

However, if you want more granular control over which services are available, you can disable `service-sync`.
This might be required if:

* You expose many services and not all are required on all sites.
* You are concerned that a specific service is not available on a specific site.
To disable service synchronization:

[source, bash, subs=attributes+]
----
$ skupper init --service-sync false
----

or use the following YAML:

[source, yaml, subs=attributes+]
----
apiVersion: v1
kind: ConfigMap
metadata:
name: skupper-site
data:
name: my-site
service-sync: false
----

To check whether synchronization is enabled, check the value for `service-sync` in the output from the following command:

[source, bash, subs=attributes+]
----
$ kubectl get cm skupper-site -o json
----

If you disable service-sync and you want to consume an exposed service on a specific site, you can create that service using the following command:

[source, bash, subs=attributes+]
----
skupper service create <name> <port>
----

where `<name>` is the service name on the site where the service is exposed
and `<port>` is the port used to expose that service.


Notes:

* When considering whether services are synchronized between two sites, `service-sync` must be enabled on both sites.
* If you use the command `skupper service delete` on a site, that command only works if the service was created on that site.
* Podman sites do not support `service-sync`.

0 comments on commit 66a78e7

Please sign in to comment.