Fix indentation for all pages
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
:numbered!:
|
||||
[appendix]
|
||||
[[common-application-properties]]
|
||||
== Common application properties
|
||||
= Common application properties
|
||||
|
||||
include::_attributes.adoc[]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[discoveryclient-for-kubernetes]]
|
||||
== DiscoveryClient for Kubernetes
|
||||
= DiscoveryClient for Kubernetes
|
||||
|
||||
This project provides an implementation of https://github.com/spring-cloud/spring-cloud-commons/blob/master/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java[Discovery Client]
|
||||
for https://kubernetes.io[Kubernetes].
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[kubernetes-native-service-discovery]]
|
||||
== Kubernetes native service discovery
|
||||
= Kubernetes native service discovery
|
||||
|
||||
Kubernetes itself is capable of (server side) service discovery (see: https://kubernetes.io/docs/concepts/services-networking/service/#discovering-services).
|
||||
Using native kubernetes service discovery ensures compatibility with additional tooling, such as Istio (https://istio.io), a service mesh that is capable of load balancing, circuit breaker, failover, and much more.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[examples]]
|
||||
== Examples
|
||||
= Examples
|
||||
|
||||
Spring Cloud Kubernetes tries to make it transparent for your applications to consume Kubernetes Native Services by
|
||||
following the Spring Cloud interfaces.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[starters]]
|
||||
== Starters
|
||||
= Starters
|
||||
|
||||
Starters are convenient dependency descriptors you can include in your
|
||||
application. Include a starter to get the dependencies and Spring Boot
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[info-contributor]]
|
||||
== Info Contributor
|
||||
= Info Contributor
|
||||
|
||||
Spring Cloud Kubernetes includes an `InfoContributor` which adds Pod information to
|
||||
Spring Boot's `/info` Acturator endpoint.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[kubernetes-ecosystem-awareness]]
|
||||
== Kubernetes Ecosystem Awareness
|
||||
= Kubernetes Ecosystem Awareness
|
||||
|
||||
All features described earlier in this guide work equally well, regardless of whether your application is running inside
|
||||
Kubernetes. This is really helpful for development and troubleshooting.
|
||||
@@ -22,21 +22,21 @@ you will have to set `spring.main.cloud-platform` should be set in `bootstrap.{p
|
||||
will only take effect when set in `bootstrap.{properties|yml}` when you have `spring-cloud-starter-bootstrap` on your classpath or are setting `spring.cloud.bootstrap.enabled=true`.
|
||||
|
||||
[[breaking-changes-in-3-0-x]]
|
||||
=== Breaking Changes In 3.0.x
|
||||
== Breaking Changes In 3.0.x
|
||||
|
||||
In versions of Spring Cloud Kubernetes prior to `3.0.x`, Kubernetes awareness was implemented using `spring.cloud.kubernetes.enabled` property. This
|
||||
property was removed and is un-supported. Instead, we use Spring Boot API: https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/condition/ConditionalOnCloudPlatform.html[ConditionalOnCloudPlatform].
|
||||
If it is needed to explicitly enable or disable this awareness, use `spring.main.cloud-platform=NONE/KUBERNETES`.
|
||||
|
||||
[[kubernetes-profile-autoconfiguration]]
|
||||
=== Kubernetes Profile Autoconfiguration
|
||||
== Kubernetes Profile Autoconfiguration
|
||||
|
||||
When the application runs as a pod inside Kubernetes, a Spring profile named `kubernetes` automatically gets activated.
|
||||
This lets you customize the configuration, to define beans that are applied when the Spring Boot application is deployed
|
||||
within the Kubernetes platform (for example, different development and production configuration).
|
||||
|
||||
[[istio-awareness]]
|
||||
=== Istio Awareness
|
||||
== Istio Awareness
|
||||
|
||||
When you include the `spring-cloud-kubernetes-fabric8-istio` module in the application classpath, a new profile is added to the application,
|
||||
provided the application is running inside a Kubernetes Cluster with https://istio.io[Istio] installed. You can then use
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[leader-election]]
|
||||
== Leader Election
|
||||
= Leader Election
|
||||
|
||||
The Spring Cloud Kubernetes leader election mechanism implements the leader election API of Spring Integration using a Kubernetes ConfigMap.
|
||||
|
||||
Multiple application instances compete for leadership, but leadership will only be granted to one.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[loadbalancer-for-kubernetes]]
|
||||
== LoadBalancer for Kubernetes
|
||||
= LoadBalancer for Kubernetes
|
||||
|
||||
This project includes Spring Cloud Load Balancer for load balancing based on Kubernetes Endpoints and provides implementation of load balancer based on Kubernetes Service.
|
||||
To include it to your project add the following dependency.
|
||||
====
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[other-resources]]
|
||||
== Other Resources
|
||||
= Other Resources
|
||||
|
||||
This section lists other resources, such as presentations (slides) and videos about Spring Cloud Kubernetes.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[pod-health-indicator]]
|
||||
== Pod Health Indicator
|
||||
= Pod Health Indicator
|
||||
|
||||
Spring Boot uses https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpoint.java[`HealthIndicator`] to expose info about the health of an application.
|
||||
That makes it really useful for exposing health-related information to the user and makes it a good fit for use as https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/[readiness probes].
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[kubernetes-propertysource-implementations]]
|
||||
== Kubernetes PropertySource implementations
|
||||
= Kubernetes PropertySource implementations
|
||||
|
||||
The most common approach to configuring your Spring Boot application is to create an `application.properties` or `application.yaml` or
|
||||
an `application-profile.properties` or `application-profile.yaml` file that contains key-value pairs that provide customization values to your
|
||||
@@ -16,7 +16,7 @@ you can either add `spring-cloud-starter-bootstrap` to your application's classp
|
||||
as an environment variable.
|
||||
|
||||
[[configmap-propertysource]]
|
||||
=== Using a `ConfigMap` `PropertySource`
|
||||
== Using a `ConfigMap` `PropertySource`
|
||||
|
||||
Kubernetes provides a resource named https://kubernetes.io/docs/user-guide/configmap/[`ConfigMap`] to externalize the
|
||||
parameters to pass to your application in the form of key-value pairs or embedded `application.properties` or `application.yaml` files.
|
||||
@@ -636,7 +636,7 @@ by setting `spring.cloud.kubernetes.config.retry.enabled=false`.
|
||||
|===
|
||||
|
||||
[[secrets-propertysource]]
|
||||
=== Secrets PropertySource
|
||||
== Secrets PropertySource
|
||||
|
||||
Kubernetes has the notion of https://kubernetes.io/docs/concepts/configuration/secret/[Secrets] for storing
|
||||
sensitive data such as passwords, OAuth tokens, and so on. This project provides integration with `Secrets` to make secrets
|
||||
@@ -831,7 +831,7 @@ You can find an example of an application that uses secrets (though it has not b
|
||||
https://github.com/fabric8-quickstarts/spring-boot-camel-config[spring-boot-camel-config]
|
||||
|
||||
[[namespace-resolution]]
|
||||
=== Namespace resolution
|
||||
== Namespace resolution
|
||||
Finding an application namespace happens on a best-effort basis. There are some steps that we iterate in order
|
||||
to find it. The easiest and most common one, is to specify it in the proper configuration, for example:
|
||||
|
||||
@@ -870,12 +870,12 @@ such a method. This, in turn, could be configured via environment properties. Fo
|
||||
Failure to find a namespace from the above steps will result in an Exception being raised.
|
||||
|
||||
[[order_of_configMaps_and_secrets]]
|
||||
=== Order of ConfigMaps and Secrets
|
||||
== Order of ConfigMaps and Secrets
|
||||
|
||||
If, for whatever reason, you enabled both configmaps and secrets, and there is a common property between them, the value from the ConfigMap will have a higher precedence. That is: it will override whatever values are found in secrets.
|
||||
|
||||
[[propertysource-reload]]
|
||||
=== `PropertySource` Reload
|
||||
== `PropertySource` Reload
|
||||
|
||||
WARNING: This functionality has been deprecated in the 2020.0 release. Please see
|
||||
the <<spring-cloud-kubernetes-configuration-watcher>> controller for an alternative way
|
||||
@@ -982,7 +982,7 @@ It requires the same role as the monitored property source.
|
||||
This means, for example, that using polling on file-mounted secret sources does not require particular privileges.
|
||||
|
||||
[[namespace-label-filtering]]
|
||||
=== Reload namespace and label filtering
|
||||
== Reload namespace and label filtering
|
||||
By default, a namespace chosen using the steps outlined in <<namespace-resolution,Namespace resolution>> will be used to listen to changes
|
||||
in configmaps and secrets. i.e.: if you do not tell reload what namespaces and configmaps/secrets to watch for,
|
||||
it will watch all configmaps/secrets from the namespace that will be computed using the above algorithm.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[[security-configurations-inside-kubernetes]]
|
||||
== Security Configurations Inside Kubernetes
|
||||
= Security Configurations Inside Kubernetes
|
||||
|
||||
|
||||
[[namespace]]
|
||||
=== Namespace
|
||||
== Namespace
|
||||
|
||||
Most of the components provided in this project need to know the namespace. For Kubernetes (1.3+), the namespace is made available to the pod as part of the service account secret and is automatically detected by the client.
|
||||
For earlier versions, it needs to be specified as an environment variable to the pod. A quick way to do this is as follows:
|
||||
@@ -20,7 +20,7 @@ For earlier versions, it needs to be specified as an environment variable to the
|
||||
====
|
||||
|
||||
[[service-account]]
|
||||
=== Service Account
|
||||
== Service Account
|
||||
|
||||
For distributions of Kubernetes that support more fine-grained role-based access within the cluster, you need to make sure a pod that runs with `spring-cloud-kubernetes` has access to the Kubernetes API.
|
||||
For any service accounts you assign to a deployment or pod, you need to make sure they have the correct roles.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[service-registry-implementation]]
|
||||
== Service Registry Implementation
|
||||
= Service Registry Implementation
|
||||
|
||||
In Kubernetes service registration is controlled by the platform, the application itself does not control
|
||||
registration as it may do in other platforms. For this reason using `spring.cloud.service-registry.auto-registration.enabled`
|
||||
|
||||
Reference in New Issue
Block a user