Polish "Add consistent quotes in YAML samples of reference doc"
See gh-28911
This commit is contained in:
parent
0b781d87b1
commit
5599e8d340
|
@ -988,21 +988,21 @@ They are also exposed as separate HTTP Probes by using <<actuator#actuator.endpo
|
||||||
|
|
||||||
You can then configure your Kubernetes infrastructure with the following endpoint information:
|
You can then configure your Kubernetes infrastructure with the following endpoint information:
|
||||||
|
|
||||||
[source,yml,indent=0,subs="verbatim"]
|
[source,yaml,indent=0,subs="verbatim"]
|
||||||
----
|
----
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /actuator/health/liveness
|
path: "/actuator/health/liveness"
|
||||||
port: <actuator-port>
|
port: <actuator-port>
|
||||||
failureThreshold: ...
|
failureThreshold: ...
|
||||||
periodSeconds: ...
|
periodSeconds: ...
|
||||||
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /actuator/health/readiness
|
path: "/actuator/health/readiness"
|
||||||
port: <actuator-port>
|
port: <actuator-port>
|
||||||
failureThreshold: ...
|
failureThreshold: ...
|
||||||
periodSeconds: ...
|
periodSeconds: ...
|
||||||
----
|
----
|
||||||
|
|
||||||
NOTE: `<actuator-port>` should be set to the port that the actuator endpoints are available on.
|
NOTE: `<actuator-port>` should be set to the port that the actuator endpoints are available on.
|
||||||
|
|
|
@ -124,12 +124,12 @@ You can configure a sleep execution in a preStop handler to avoid requests being
|
||||||
This sleep should be long enough for new requests to stop being routed to the pod and its duration will vary from deployment to deployment.
|
This sleep should be long enough for new requests to stop being routed to the pod and its duration will vary from deployment to deployment.
|
||||||
The preStop handler can be configured by using the PodSpec in the pod's configuration file as follows:
|
The preStop handler can be configured by using the PodSpec in the pod's configuration file as follows:
|
||||||
|
|
||||||
[source,yml,indent=0,subs="verbatim"]
|
[source,yaml,indent=0,subs="verbatim"]
|
||||||
----
|
----
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: example-container
|
- name: "example-container"
|
||||||
image: example-image
|
image: "example-image"
|
||||||
lifecycle:
|
lifecycle:
|
||||||
preStop:
|
preStop:
|
||||||
exec:
|
exec:
|
||||||
|
@ -379,26 +379,26 @@ Normally, you put this file in `src/main/appengine`, and it should resemble the
|
||||||
|
|
||||||
[source,yaml,indent=0,subs="verbatim"]
|
[source,yaml,indent=0,subs="verbatim"]
|
||||||
----
|
----
|
||||||
service: default
|
service: "default"
|
||||||
|
|
||||||
runtime: java
|
runtime: "java"
|
||||||
env: flex
|
env: "flex"
|
||||||
|
|
||||||
runtime_config:
|
runtime_config:
|
||||||
jdk: openjdk8
|
jdk: "openjdk8"
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- url: /.*
|
- url: "/.*"
|
||||||
script: this field is required, but ignored
|
script: "this field is required, but ignored"
|
||||||
|
|
||||||
manual_scaling:
|
manual_scaling:
|
||||||
instances: 1
|
instances: 1
|
||||||
|
|
||||||
health_check:
|
health_check:
|
||||||
enable_health_check: False
|
enable_health_check: false
|
||||||
|
|
||||||
env_variables:
|
env_variables:
|
||||||
ENCRYPT_KEY: your_encryption_key_here
|
ENCRYPT_KEY: "your_encryption_key_here"
|
||||||
----
|
----
|
||||||
|
|
||||||
You can deploy the app (for example, with a Maven plugin) by adding the project ID to the build configuration, as shown in the following example:
|
You can deploy the app (for example, with a Maven plugin) by adding the project ID to the build configuration, as shown in the following example:
|
||||||
|
|
|
@ -293,18 +293,18 @@ For instance, the two examples below produce the same result:
|
||||||
----
|
----
|
||||||
spring:
|
spring:
|
||||||
config:
|
config:
|
||||||
import: my.properties
|
import: "my.properties"
|
||||||
my:
|
my:
|
||||||
property: value
|
property: "value"
|
||||||
----
|
----
|
||||||
|
|
||||||
[source,yaml,indent=0,subs="verbatim",configblocks]
|
[source,yaml,indent=0,subs="verbatim",configblocks]
|
||||||
----
|
----
|
||||||
my:
|
my:
|
||||||
property: value
|
property: "value"
|
||||||
spring:
|
spring:
|
||||||
config:
|
config:
|
||||||
import: my.properties
|
import: "my.properties"
|
||||||
----
|
----
|
||||||
|
|
||||||
In both of the above examples, the values from the `my.properties` file will take precedence over the file that triggered its import.
|
In both of the above examples, the values from the `my.properties` file will take precedence over the file that triggered its import.
|
||||||
|
@ -472,14 +472,14 @@ For example, the following file has two logical documents:
|
||||||
----
|
----
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: MyApp
|
name: "MyApp"
|
||||||
---
|
---
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: MyCloudApp
|
name: "MyCloudApp"
|
||||||
config:
|
config:
|
||||||
activate:
|
activate:
|
||||||
on-cloud-platform: kubernetes
|
on-cloud-platform: "kubernetes"
|
||||||
----
|
----
|
||||||
|
|
||||||
For `application.properties` files a special `#---` comment is used to mark the document splits:
|
For `application.properties` files a special `#---` comment is used to mark the document splits:
|
||||||
|
@ -528,14 +528,14 @@ For example, the following specifies that the second document is only active whe
|
||||||
[source,yaml,indent=0,subs="verbatim",configblocks]
|
[source,yaml,indent=0,subs="verbatim",configblocks]
|
||||||
----
|
----
|
||||||
myprop:
|
myprop:
|
||||||
always-set
|
"always-set"
|
||||||
---
|
---
|
||||||
spring:
|
spring:
|
||||||
config:
|
config:
|
||||||
activate:
|
activate:
|
||||||
on-cloud-platform: "kubernetes"
|
on-cloud-platform: "kubernetes"
|
||||||
on-profile: "prod | staging"
|
on-profile: "prod | staging"
|
||||||
myotherprop: sometimes-set
|
myotherprop: "sometimes-set"
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
|
@ -568,11 +568,11 @@ For example, consider the following YAML document:
|
||||||
----
|
----
|
||||||
environments:
|
environments:
|
||||||
dev:
|
dev:
|
||||||
url: https://dev.example.com
|
url: "https://dev.example.com"
|
||||||
name: Developer Setup
|
name: "Developer Setup"
|
||||||
prod:
|
prod:
|
||||||
url: https://another.example.com
|
url: "https://another.example.com"
|
||||||
name: My Cool App
|
name: "My Cool App"
|
||||||
----
|
----
|
||||||
|
|
||||||
In order to access these properties from the `Environment`, they would be flattened as follows:
|
In order to access these properties from the `Environment`, they would be flattened as follows:
|
||||||
|
@ -593,8 +593,8 @@ For example, consider the following YAML:
|
||||||
----
|
----
|
||||||
my:
|
my:
|
||||||
servers:
|
servers:
|
||||||
- dev.example.com
|
- "dev.example.com"
|
||||||
- another.example.com
|
- "another.example.com"
|
||||||
----
|
----
|
||||||
|
|
||||||
The preceding example would be transformed into these properties:
|
The preceding example would be transformed into these properties:
|
||||||
|
@ -789,10 +789,10 @@ This style of configuration works particularly well with the `SpringApplication`
|
||||||
service:
|
service:
|
||||||
remote-address: 192.168.1.1
|
remote-address: 192.168.1.1
|
||||||
security:
|
security:
|
||||||
username: admin
|
username: "admin"
|
||||||
roles:
|
roles:
|
||||||
- USER
|
- "USER"
|
||||||
- ADMIN
|
- "ADMIN"
|
||||||
----
|
----
|
||||||
|
|
||||||
To work with `@ConfigurationProperties` beans, you can inject them in the same way as any other bean, as shown in the following example:
|
To work with `@ConfigurationProperties` beans, you can inject them in the same way as any other bean, as shown in the following example:
|
||||||
|
|
Loading…
Reference in New Issue