-
Notifications
You must be signed in to change notification settings - Fork 9
disable service sync with yaml and consume service remotely #257
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ metadata: | |
data: | ||
name: my-site | ||
ingress: "none" | ||
service-sync: "false" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are three places where 'port' is set; it might be interesting to explain what's the role of each of them, especially given that one of them will be overwritten by Skupper. |
||
---- | ||
|
||
. Apply that yaml in the context of the site where `service-sync` is disabled: | ||
+ | ||
[source, yaml] | ||
---- | ||
$ kubectl apply -f backend.yaml | ||
---- | ||
|
||
. Test the service. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure about using 'available' here. The skupper service is still available on all sites. The difference is that without the service-sync a k8s service will not be automatically created on this site. Perhaps something along the lines
|
||
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: | ||
+ | ||
|
@@ -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] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be interesting to mention that this needs to match the name of the service created on the other side, as that will be the main alteration the user will do on this file.