Skip to content

Commit 4d813c6

Browse files
authored
Merge pull request #1822 from facewise/fix-docs
Fix broken docs and polish
2 parents 4bda2fa + 17579d7 commit 4d813c6

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

docs/modules/ROOT/pages/discovery-client.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ HTTP Based `DiscoveryClient`
4848
====
4949

5050
NOTE: `spring-cloud-starter-kubernetes-discoveryclient` is designed to be used with the
51-
<<spring-cloud-kubernetes-discoveryserver, Spring Cloud Kubernetes DiscoveryServer>>.
51+
xref:spring-cloud-kubernetes-discoveryserver.adoc[Spring Cloud Kubernetes DiscoveryServer].
5252

5353
To enable loading of the `DiscoveryClient`, add `@EnableDiscoveryClient` to the according configuration or application class, as the following example shows:
5454

docs/modules/ROOT/pages/getting-started.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use and use the starters for that library only.
3232
<artifactId>spring-cloud-starter-kubernetes-client</artifactId>
3333
</dependency>
3434
----
35-
| <<DiscoveryClient for Kubernetes,Discovery Client>> implementation that
35+
| xref:discovery-client.adoc[Discovery Client] implementation that
3636
resolves service names to Kubernetes Services.
3737

3838
| [source,xml]

docs/modules/ROOT/pages/kubernetes-awareness.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ If it is needed to explicitly enable or disable this awareness, use `spring.main
3030

3131
- Another breaking change is the additional `list` verb needed for loading configmaps/secrets. For example:
3232

33-
```
33+
[source,yaml]
34+
----
3435
apiVersion: rbac.authorization.k8s.io/v1
3536
kind: ClusterRole
3637
metadata:
@@ -39,7 +40,7 @@ rules:
3940
- apiGroups: ["", "extensions", "apps", "discovery.k8s.io"]
4041
resources: ["configmaps", "pods", "services", "endpoints", "secrets", "endpointslices"]
4142
verbs: ["get", "list", "watch"]
42-
```
43+
----
4344

4445
[[kubernetes-profile-autoconfiguration]]
4546
== Kubernetes Profile Autoconfiguration

docs/modules/ROOT/pages/property-source-config/configmap-propertysource.adoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ An example should make a lot more sense. Let's suppose that `spring.application.
5757
we have a single active profile called `k8s`. For a configuration as below:
5858

5959

60-
[source]
60+
[source,yaml]
6161
----
6262
kind: ConfigMap
6363
apiVersion: v1
@@ -92,7 +92,7 @@ The order of loading properties is a as follows:
9292
This means that profile based sources take precedence over non-profile based sources (just like in a vanilla Spring app); and plain properties take precedence over both profile and non-profile based sources. Here is an example:
9393

9494
====
95-
[source]
95+
[source,yaml]
9696
----
9797
kind: ConfigMap
9898
apiVersion: v1
@@ -101,7 +101,7 @@ metadata:
101101
data:
102102
my-app-k8s.yaml: |-
103103
key1=valueA
104-
key2=valueB
104+
key2=valueB
105105
my-app.yaml: |-
106106
key1=valueC
107107
key2=valueA
@@ -318,13 +318,13 @@ spec:
318318
metadata:
319319
labels:
320320
app: deployment-name
321-
spec:
322-
containers:
323-
- name: container-name
324-
image: your-image
325-
env:
326-
- name: SPRING_PROFILES_ACTIVE
327-
value: "development"
321+
spec:
322+
containers:
323+
- name: container-name
324+
image: your-image
325+
env:
326+
- name: SPRING_PROFILES_ACTIVE
327+
value: "development"
328328
----
329329

330330
You could run into a situation where there are multiple configs maps that have the same property names. For example:
@@ -447,7 +447,7 @@ will result in three properties being generated:
447447
The same way you configure a prefix for configmaps, you can do it for secrets also; both for secrets that are based on name
448448
and the ones based on labels. For example:
449449

450-
[source.yaml]
450+
[source,yaml]
451451
----
452452
spring:
453453
application:
@@ -479,7 +479,7 @@ will be the name of the secret found for those particular labels.
479479

480480
One more thing to bear in mind is that we support `prefix` per _secret_. The easiest way to explain this is via an example:
481481

482-
[source.yaml]
482+
[source,yaml]
483483
----
484484
spring:
485485
application:
@@ -553,15 +553,16 @@ This behavior is controlled by the `spring.cloud.kubernetes.config.paths` proper
553553
addition to or instead of the mechanism described earlier.
554554
`spring.cloud.kubernetes.config.paths` expects a List of full paths to each property file, because directories are not being recursively parsed. For example:
555555

556-
```
556+
[source,yaml]
557+
----
557558
spring:
558559
cloud:
559560
kubernetes:
560561
config:
561562
paths:
562563
- /tmp/application.properties
563564
- /var/application.yaml
564-
```
565+
----
565566

566567
NOTE: If you use `spring.cloud.kubernetes.config.paths` or `spring.cloud.kubernetes.secrets.path` the automatic reload
567568
functionality will not work. You will need to make a `POST` request to the `/actuator/refresh` endpoint or
@@ -599,4 +600,3 @@ by setting `spring.cloud.kubernetes.config.retry.enabled=false`.
599600
| `spring.cloud.kubernetes.config.retry.max-interval` | `Long` | `2000` | Maximum interval for backoff.
600601
| `spring.cloud.kubernetes.config.retry.multiplier` | `Double` | `1.1` | Multiplier for next interval.
601602
|===
602-

docs/modules/ROOT/pages/property-source-config/propertysource-reload.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
= `PropertySource` Reload
33

44
WARNING: This functionality has been deprecated in the 2020.0 release. Please see
5-
the xref:spring-cloud-kubernetes-configuration-watcher.adoc#spring-cloud-kubernetes-configuration-watcher[Spring Cloud Kubernetes Configuration Watcher]
5+
the xref:spring-cloud-kubernetes-configuration-watcher.adoc[Spring Cloud Kubernetes Configuration Watcher]
66
controller for an alternative way to achieve the same functionality.
77

88
Some applications may need to detect changes on external property sources and update their internal status to reflect the new configuration.
@@ -98,4 +98,3 @@ The `view` role on the service account is required in order to listen for config
9898
You can configure the polling period by using the `spring.cloud.kubernetes.reload.period` property and defaults to 15 seconds.
9999
It requires the same role as the monitored property source.
100100
This means, for example, that using polling on file-mounted secret sources does not require particular privileges.
101-

0 commit comments

Comments
 (0)