From 33cf05f58f9a5053611f03f1d2a21fc254bed975 Mon Sep 17 00:00:00 2001 From: Paul Wright Date: Thu, 13 Feb 2025 11:06:03 +0000 Subject: [PATCH 1/2] disable service sync with yaml --- examples/no-ingress.yaml | 1 + yaml/index.adoc | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/no-ingress.yaml b/examples/no-ingress.yaml index d4a25d5..da1b3cc 100644 --- a/examples/no-ingress.yaml +++ b/examples/no-ingress.yaml @@ -5,3 +5,4 @@ metadata: data: name: my-site ingress: "none" + service-sync: "false" diff --git a/yaml/index.adoc b/yaml/index.adoc index 6cf9d21..26e2d12 100644 --- a/yaml/index.adoc +++ b/yaml/index.adoc @@ -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, for example `skupper service create backend 8080`. + + -- . Apply the YAML file to your cluster: + From b6e5e2f4de139337b006d8f059cb6e7f8eaf853e Mon Sep 17 00:00:00 2001 From: Paul Wright Date: Tue, 18 Feb 2025 12:17:53 +0000 Subject: [PATCH 2/2] include yaml to consume service where service-sync is disabled --- yaml/annotations.adoc | 36 ++++++++++++++++++++++++++++++++++++ yaml/index.adoc | 4 +--- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/yaml/annotations.adoc b/yaml/annotations.adoc index 58254bb..9874dec 100644 --- a/yaml/annotations.adoc +++ b/yaml/annotations.adoc @@ -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. diff --git a/yaml/index.adoc b/yaml/index.adoc index 26e2d12..f46385e 100644 --- a/yaml/index.adoc +++ b/yaml/index.adoc @@ -89,7 +89,7 @@ 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, for example `skupper service create backend 8080`. +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[]. -- @@ -175,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]