diff --git a/bom/pom.xml b/bom/pom.xml index cdaec731..e3c86101 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -151,6 +151,11 @@ stork-service-registration-static-list ${project.version} + + io.smallrye.stork + stork-service-registration-eureka + ${project.version} + io.smallrye.stork stork-test-utils diff --git a/docs/docs/load-balancer/least-requests.md b/docs/docs/load-balancer/least-requests.md index 65437e94..c64c2f2d 100644 --- a/docs/docs/load-balancer/least-requests.md +++ b/docs/docs/load-balancer/least-requests.md @@ -25,19 +25,14 @@ For each service expected to use a least-response-time selection, configure the === "stork standalone" ```properties - stork.my-service.service-discovery.type=... - stork.my-service.service-discovery...=... stork.my-service.load-balancer.type=least-requests ``` === "stork in quarkus" ```properties - quarkus.stork.my-service.service-discovery.type=... - quarkus.stork.my-service.service-discovery...=... quarkus.stork.my-service.load-balancer.type=least-requests ``` -[//]: # (Supported attributes are the following:) +Supported configuration properties are the following: -[//]: # () -[//]: # (--8<-- "../load-balancer/least-requests/target/classes/META-INF/stork-docs/least-requests-lb-attributes.txt") \ No newline at end of file +--8<-- "target/attributes/META-INF/stork-docs/least-requests-lb-attributes.txt" \ No newline at end of file diff --git a/docs/docs/load-balancer/response-time.md b/docs/docs/load-balancer/least-response-time.md similarity index 93% rename from docs/docs/load-balancer/response-time.md rename to docs/docs/load-balancer/least-response-time.md index f5dfc5fe..fe78d2ed 100644 --- a/docs/docs/load-balancer/response-time.md +++ b/docs/docs/load-balancer/least-response-time.md @@ -32,15 +32,11 @@ For each service expected to use a least-response-time selection, configure the === "stork standalone" ```properties - stork.my-service.service-discovery.type=... - stork.my-service.service-discovery...=... stork.my-service.load-balancer.type=least-response-time ``` === "stork in quarkus" ```properties - quarkus.stork.my-service.service-discovery.type=... - quarkus.stork.my-service.service-discovery...=... quarkus.stork.my-service.load-balancer.type=least-response-time ``` @@ -72,4 +68,8 @@ score(n) = \delta^{n - n_{max}} * \frac{\sum_i t_i * w_i}{\sum_i w_i} = \delta^{n - n_{max}} * \frac{\sum_i t_i * \delta^{n - n_i}}{\sum_i \delta^{n - n_i}} $$ -The `declining-factor` should be in $(0, 1]$ , the default is $0.9$. Using a lower value makes the older response times less important. \ No newline at end of file +The `declining-factor` should be in $(0, 1]$ , the default is $0.9$. Using a lower value makes the older response times less important. + +Supported configuration properties are the following: + +--8<-- "target/attributes/META-INF/stork-docs/least-response-time-lb-attributes.txt" \ No newline at end of file diff --git a/docs/docs/load-balancer/power-of-two-choices.md b/docs/docs/load-balancer/power-of-two-choices.md index 8bad052a..95ed9de9 100644 --- a/docs/docs/load-balancer/power-of-two-choices.md +++ b/docs/docs/load-balancer/power-of-two-choices.md @@ -30,18 +30,14 @@ For each service expected to use a random service selection, configure the `load === "stork standalone" ```properties - stork.my-service.service-discovery.type=... - stork.my-service.service-discovery...=... stork.my-service.load-balancer.type=power-of-two-choices ``` === "stork in quarkus" ```properties - quarkus.stork.my-service.service-discovery.type=... - quarkus.stork.my-service.service-discovery...=... quarkus.stork.my-service.load-balancer.type=power-of-two-choices ``` -Supported attributes are the following: +Supported configuration properties are the following: ---8<-- "../load-balancer/power-of-two-choices/target/classes/META-INF/stork-docs/power-of-two-choices-lb-attributes.txt" \ No newline at end of file +--8<-- "target/attributes/META-INF/stork-docs/power-of-two-choices-lb-attributes.txt" \ No newline at end of file diff --git a/docs/docs/load-balancer/random.md b/docs/docs/load-balancer/random.md index 45ea9c78..b11cdac9 100644 --- a/docs/docs/load-balancer/random.md +++ b/docs/docs/load-balancer/random.md @@ -20,18 +20,14 @@ For each service expected to use a random service selection, configure the `load === "stork standalone" ```properties - stork.my-service.service-discovery.type=... - stork.my-service.service-discovery...=... stork.my-service.load-balancer.type=random ``` === "stork in quarkus" ```properties - quarkus.stork.my-service.service-discovery.type=... - quarkus.stork.my-service.service-discovery...=... quarkus.stork.my-service.load-balancer.type=random ``` Supported attributes are the following: ---8<-- "../load-balancer/random/target/classes/META-INF/stork-docs/random-lb-attributes.txt" +--8<-- "target/attributes/META-INF/stork-docs/random-lb-attributes.txt" diff --git a/docs/docs/load-balancer/round-robin.md b/docs/docs/load-balancer/round-robin.md index 4e1e24e0..524f8222 100644 --- a/docs/docs/load-balancer/round-robin.md +++ b/docs/docs/load-balancer/round-robin.md @@ -15,14 +15,10 @@ However, you can also configure it explicitly as follows: === "stork standalone" ```properties - stork.my-service.service-discovery.type=... - stork.my-service.service-discovery...=... stork.my-service.load-balancer.type=round-robin ``` === "stork in quarkus" ```properties - quarkus.stork.my-service.service-discovery.type=... - quarkus.stork.my-service.service-discovery...=... quarkus.stork.my-service.load-balancer.type=round-robin ``` diff --git a/docs/docs/load-balancer/sticky.md b/docs/docs/load-balancer/sticky.md index 1e3038a9..d641802a 100644 --- a/docs/docs/load-balancer/sticky.md +++ b/docs/docs/load-balancer/sticky.md @@ -20,19 +20,15 @@ To use the `sticky` load service selection strategy, set the load balancer type === "stork standalone" ```properties - stork.my-service.service-discovery.type=... - stork.my-service.service-discovery...=... stork.my-service.load-balancer.type=sticky ``` === "stork in quarkus" ```properties - quarkus.stork.my-service.service-discovery.type=... - quarkus.stork.my-service.service-discovery...=... quarkus.stork.my-service.load-balancer.type=sticky ``` The following attributes are supported: ---8<-- "../load-balancer/sticky/target/classes/META-INF/stork-docs/sticky-lb-attributes.txt" \ No newline at end of file +--8<-- "target/attributes/META-INF/stork-docs/sticky-lb-attributes.txt" \ No newline at end of file diff --git a/docs/docs/service-discovery/composite.md b/docs/docs/service-discovery/composite.md index 0315090c..51e2f791 100644 --- a/docs/docs/service-discovery/composite.md +++ b/docs/docs/service-discovery/composite.md @@ -43,4 +43,4 @@ Remember to define the services that make up your composite service. These are all the parameters of the composite service discovery: ---8<-- "../service-discovery/composite/target/classes/META-INF/stork-docs/composite-sd-attributes.txt" \ No newline at end of file +--8<-- "target/attributes/META-INF/stork-docs/composite-sd-attributes.txt" \ No newline at end of file diff --git a/docs/docs/service-discovery/consul.md b/docs/docs/service-discovery/consul.md index 88654e0c..68ee94d0 100644 --- a/docs/docs/service-discovery/consul.md +++ b/docs/docs/service-discovery/consul.md @@ -35,26 +35,4 @@ For each service that should get the service instances from Consul, configure th Consul service discovery is configured with the following parameters: ---8<-- "../service-discovery/consul/target/classes/META-INF/stork-docs/consul-sd-attributes.txt" - -## Service registration - -Stork also provides the ability to register services using Consul as backend. - -### Service registration configuration - -For each service that should register the service instances in Consul, configure the service registrar `type`: - -=== "stork standalone" -```properties -stork.my-service.service-registrar.type=consul -``` - -=== "stork in quarkus" -```properties -quarkus.stork.my-service.service-registrar.type=consul -``` - -Consul service registrar is configured with the following parameters: - ---8<-- "../service-discovery/consul/target/classes/META-INF/stork-docs/consul-sr-attributes.txt" \ No newline at end of file +--8<-- "target/attributes/META-INF/stork-docs/consul-sd-attributes.txt" \ No newline at end of file diff --git a/docs/docs/service-discovery/dns.md b/docs/docs/service-discovery/dns.md index 91eccdfa..82f1d7b0 100644 --- a/docs/docs/service-discovery/dns.md +++ b/docs/docs/service-discovery/dns.md @@ -54,4 +54,4 @@ All in all, your configuration could look as follows: All the available parameters are as follows: ---8<-- "../service-discovery/dns/target/classes/META-INF/stork-docs/dns-sd-attributes.txt" +--8<-- "target/attributes/META-INF/stork-docs/dns-sd-attributes.txt" diff --git a/docs/docs/service-discovery/eureka.md b/docs/docs/service-discovery/eureka.md index 11b22702..4b0217d3 100644 --- a/docs/docs/service-discovery/eureka.md +++ b/docs/docs/service-discovery/eureka.md @@ -39,7 +39,7 @@ Stork looks for the service with the given name (`my-service` in the previous ex Supported attributes are the following: ---8<-- "../service-discovery/eureka/target/classes/META-INF/stork-docs/eureka-sd-attributes.txt" +--8<-- "target/attributes/META-INF/stork-docs/eureka-sd-attributes.txt" The `application` attribute is optional. It uses the Stork service name (`my-service` in the previous configuration) if not set. @@ -50,28 +50,3 @@ Using this attribute prevents load-balancing as you will always select a single The `secure` attribute indicates if you want the _secure virtual address_ of the application instance. If set to `true`, unsecured instances are filtered out from the available instances. -## Service registration - -Stork also provides the ability to register services using Eureka as backend. - -### Service registration configuration - -For each service that should register the service instances in Eureka, configure the service registrar `type`: - -=== "stork standalone" -```properties -stork.my-service.service-registrar.type=eureka -stork.my-service.service-registrar.eureka-host=localhost -stork.my-service.service-registrar.eureka-port=8761 -``` - -=== "stork in quarkus" -```properties -quarkus.stork.my-service.service-registrar.type=eureka -quarkus.stork.my-service.service-registrar.eureka-host=localhost -quarkus.stork.my-service.service-registrar.eureka-port=8761 -``` - -Eureka service registrar is configured with the following parameters: - ---8<-- "../service-discovery/eureka/target/classes/META-INF/stork-docs/eureka-sr-attributes.txt" diff --git a/docs/docs/service-discovery/knative.md b/docs/docs/service-discovery/knative.md index 3510fa57..2aade7d0 100644 --- a/docs/docs/service-discovery/knative.md +++ b/docs/docs/service-discovery/knative.md @@ -95,7 +95,7 @@ Stork inspects the _Knative Service_ and retrieves the url of the service. Supported attributes are the following: ---8<-- "../service-discovery/knative/target/classes/META-INF/stork-docs/knative-sd-attributes.txt" +--8<-- "target/attributes/META-INF/stork-docs/knative-sd-attributes.txt" ## Caching the service instances diff --git a/docs/docs/service-discovery/kubernetes.md b/docs/docs/service-discovery/kubernetes.md index 50f3477c..ee989427 100644 --- a/docs/docs/service-discovery/kubernetes.md +++ b/docs/docs/service-discovery/kubernetes.md @@ -95,7 +95,7 @@ Then, it can select the instance. Supported attributes are the following: ---8<-- "../service-discovery/kubernetes/target/classes/META-INF/stork-docs/kubernetes-sd-attributes.txt" +--8<-- "target/attributes/META-INF/stork-docs/kubernetes-sd-attributes.txt" ## Caching the service instances diff --git a/docs/docs/service-discovery/static-list.md b/docs/docs/service-discovery/static-list.md index fece2f2c..fae1cf1e 100644 --- a/docs/docs/service-discovery/static-list.md +++ b/docs/docs/service-discovery/static-list.md @@ -33,26 +33,4 @@ For each service that should use the static list of service instances configure These are all the static service discovery parameters: ---8<-- "../service-discovery/static-list/target/classes/META-INF/stork-docs/static-sd-attributes.txt" - -## Service registration - -Stork also provides the ability to register services using Static list as backend. - -### Service registration configuration - -For each service that should register the service instances in a static list, configure the service registrar `type`: - -=== "stork standalone" -```properties -stork.my-service.service-registrar.type=static -``` - -=== "stork in quarkus" -```properties -quarkus.stork.my-service.service-registrar.type=static -``` - -Static service registrar is configured with the following parameters: - ---8<-- "../service-discovery/consul/target/classes/META-INF/stork-docs/static-sr-attributes.txt" \ No newline at end of file +--8<-- "target/attributes/META-INF/stork-docs/static-sd-attributes.txt" diff --git a/docs/docs/service-registration/consul.md b/docs/docs/service-registration/consul.md index 09802e91..db8d7c59 100644 --- a/docs/docs/service-registration/consul.md +++ b/docs/docs/service-registration/consul.md @@ -35,4 +35,4 @@ quarkus.stork.my-service.service-registrar.type=consul Consul service registrar is configured with the following parameters: ---8<-- "../service-registration/consul/target/classes/META-INF/stork-docs/consul-sr-attributes.txt" \ No newline at end of file +--8<-- "target/attributes/META-INF/stork-docs/consul-sr-attributes.txt" \ No newline at end of file diff --git a/docs/docs/service-registration/eureka.md b/docs/docs/service-registration/eureka.md index 64b98e56..1afd725a 100644 --- a/docs/docs/service-registration/eureka.md +++ b/docs/docs/service-registration/eureka.md @@ -36,4 +36,4 @@ quarkus.stork.my-service.service-registrar.eureka-port=8761 Eureka service registrar is configured with the following parameters: ---8<-- "../service-registration/eureka/target/classes/META-INF/stork-docs/eureka-sr-attributes.txt" +--8<-- "target/attributes/META-INF/stork-docs/eureka-sr-attributes.txt" diff --git a/docs/docs/service-registration/static-list.md b/docs/docs/service-registration/static-list.md index 4321e25f..c058ac9c 100644 --- a/docs/docs/service-registration/static-list.md +++ b/docs/docs/service-registration/static-list.md @@ -31,4 +31,4 @@ quarkus.stork.my-service.service-registrar.type=static Static service registrar is configured with the following parameters: ---8<-- "../service-registration/consul/target/classes/META-INF/stork-docs/static-sr-attributes.txt" \ No newline at end of file +--8<-- "target/attributes/META-INF/stork-docs/static-sr-attributes.txt" \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 624056a1..7151f6e0 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -26,7 +26,7 @@ nav: - Round Robin: 'load-balancer/round-robin.md' - Random: 'load-balancer/random.md' - Least Requests: 'load-balancer/least-requests.md' - - Response Time: 'load-balancer/response-time.md' + - Least Response Time: 'load-balancer/least-response-time.md' - Power Of Two Choices: 'load-balancer/power-of-two-choices.md' - Sticky: 'load-balancer/sticky.md' - Custom Load Balancer: 'load-balancer/custom-load-balancer.md' @@ -93,7 +93,8 @@ markdown_extensions: - name: mermaid class: mermaid format: !!python/name:pymdownx.superfences.fence_code_format - - pymdownx.snippets + - pymdownx.snippets: + base_path: !relative $config_dir - pymdownx.inlinehilite - pymdownx.details - pymdownx.smartsymbols diff --git a/docs/pom.xml b/docs/pom.xml index 7ea29e47..c9faf8e9 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -82,6 +82,14 @@ io.smallrye.stork stork-service-registration-static-list + + io.smallrye.stork + stork-service-registration-consul + + + io.smallrye.stork + stork-service-registration-eureka + io.smallrye.stork stork-spring-boot-config @@ -107,11 +115,20 @@ io.smallrye.stork stork-service-discovery-eureka + + io.smallrye.stork + stork-service-discovery-dns + io.smallrye.stork stork-service-discovery-kubernetes provided + + io.smallrye.stork + stork-service-discovery-knative + provided + io.smallrye.stork stork-load-balancer-random @@ -131,5 +148,10 @@ stork-load-balancer-least-response-time provided + + io.smallrye.stork + stork-load-balancer-sticky + provided +