Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable service sync with yaml and consume service remotely #257

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/no-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ metadata:
data:
name: my-site
ingress: "none"
service-sync: "false"
36 changes: 36 additions & 0 deletions yaml/annotations.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,39 @@ Applies to:
// Applies to:
// * StatefulSets


// Type: procedure
[id="service-yaml"]
= Creating a service when service-sync is disabled

If you set `service-sync: "false"` when creating a site and you want to consume a service exposed on another site:

. Create `backend.yaml` similar to the following:
+
[source, yaml]
----
apiVersion: v1
kind: Service
metadata:
name: backend
annotations:
skupper.io/proxy: tcp
skupper.io/address: backend
skupper.io/port: "8080"
skupper.io/ingress-only: "true"
spec:
ports:
- name: http
protocol: TCP
port: 8080
targetPort: 8080
----

. Apply that yaml in the context of the site where `service-sync` is disabled:
+
[source, yaml]
----
$ kubectl apply -f backend.yaml
----

. Test the service.
8 changes: 5 additions & 3 deletions yaml/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,16 @@ include::../examples/my-site.yaml[]
----
The YAML creates a site with a console and you can create tokens from this site.

To create a site that has no ingress:
To create a site that has no ingress and with `service-sync` disabled:

----
include::../examples/no-ingress.yaml[]
----

NOTE: By default, `service-sync` is enabled and if you create a service on one site, it is available on all sites.
If `service-sync` is set to false for a site, you need to create the service on that site as described in xref:service-yaml[].


--
. Apply the YAML file to your cluster:
+
Expand Down Expand Up @@ -171,8 +175,6 @@ A future release of Skupper will provide an alternative declarative method to cr

include::annotations.adoc[leveloffset=+1]



// Type: reference
[id="site-config-reference"]
[appendix]
Expand Down