Skip to content

Commit ee20884

Browse files
pukkaoneRyan Baxter
authored and
Ryan Baxter
committed
Document Spring Boot starters (spring-cloud#332)
List all starters in a summary near the beginning of the documentation. Delete version from the example POM dependencies. Version should be assigned by the BOM. Fixes spring-cloud#146 Fixes spring-cloud#326
1 parent c9a225e commit ee20884

File tree

4 files changed

+54
-20
lines changed

4 files changed

+54
-20
lines changed

docs/src/main/asciidoc/discovery-client.adoc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ A service is typically exposed by the Kubernetes API server as a collection of e
77
access from a Spring Boot application running as a pod. This discovery feature is also used by the Spring Cloud Kubernetes Ribbon project
88
to fetch the list of the endpoints defined for an application to be load balanced.
99

10-
This is something that you get for free just by adding the following dependency inside your project:
11-
12-
```xml
13-
<dependency>
14-
<groupId>org.springframework.cloud</groupId>
15-
<artifactId>spring-cloud-starter-kubernetes</artifactId>
16-
<version>${latest.version}</version>
17-
</dependency>
18-
```
19-
2010
To enable loading of the `DiscoveryClient`, add `@EnableDiscoveryClient` to the according configuration or application class like this:
2111

2212
```java
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
== Starters
2+
3+
Starters are convenient dependency descriptors you can include in your
4+
application. Include a starter to get the dependencies and Spring Boot
5+
auto-configuration for a feature set.
6+
7+
[cols="a,d"]
8+
|===
9+
| Starter | Features
10+
11+
| [source,xml]
12+
----
13+
<dependency>
14+
<groupId>org.springframework.cloud</groupId>
15+
<artifactId>spring-cloud-starter-kubernetes</artifactId>
16+
</dependency>
17+
----
18+
| <<DiscoveryClient for Kubernetes,Discovery Client>> implementation that
19+
resolves service names to Kubernetes Services.
20+
21+
| [source,xml]
22+
----
23+
<dependency>
24+
<groupId>org.springframework.cloud</groupId>
25+
<artifactId>spring-cloud-starter-kubernetes-config</artifactId>
26+
</dependency>
27+
----
28+
| Load application properties from Kubernetes
29+
<<ConfigMap PropertySource,ConfigMaps>> and <<Secrets PropertySource,Secrets>>.
30+
<<PropertySource Reload,Reload>> application properties when a ConfigMap or
31+
Secret changes.
32+
33+
| [source,xml]
34+
----
35+
<dependency>
36+
<groupId>org.springframework.cloud</groupId>
37+
<artifactId>spring-cloud-starter-kubernetes-ribbon</artifactId>
38+
</dependency>
39+
----
40+
| <<Ribbon discovery in Kubernetes,Ribbon>> client-side load balancer with
41+
server list obtained from Kubernetes Endpoints.
42+
43+
| [source,xml]
44+
----
45+
<dependency>
46+
<groupId>org.springframework.cloud</groupId>
47+
<artifactId>spring-cloud-starter-kubernetes-all</artifactId>
48+
</dependency>
49+
----
50+
| All Spring Cloud Kubernetes features.
51+
52+
|===

docs/src/main/asciidoc/ribbon-integration.adoc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ implemented within the [spring-cloud-kubernetes-ribbon](spring-cloud-kubernetes-
77
Kubernetes client will populate a https://github.com/Netflix/ribbon[Ribbon] `ServerList` containing information
88
about such endpoints.
99

10-
The implementation is part of the following starter that you can use by adding its dependency to your pom file:
11-
12-
```xml
13-
<dependency>
14-
<groupId>org.springframework.cloud</groupId>
15-
<artifactId>spring-cloud-starter-kubernetes-ribbon</artifactId>
16-
<version>${latest.version}</version>
17-
</dependency>
18-
```
19-
2010
When the list of the endpoints is populated, the Kubernetes client will search the registered endpoints living in
2111
the current namespace/project matching the service name defined using the Ribbon Client annotation:
2212

docs/src/main/asciidoc/spring-cloud-kubernetes.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
Spring Cloud Kubernetes provide Spring Cloud common interfaces implementations to consume Kubernetes native services.
66
The main objective of the projects provided in this repository is to facilitate the integration of Spring Cloud/Spring Boot applications running inside Kubernetes.
77

8+
include::getting-started.adoc[]
9+
810
include::discovery-client.adoc[]
911

1012
include::discovery-kubernetes-native.adoc[]

0 commit comments

Comments
 (0)