Update SNAPSHOT to 1.0.3.RELEASE
This commit is contained in:
77
README.adoc
77
README.adoc
@@ -112,6 +112,15 @@ private DiscoveryClient discoveryClient;
|
||||
----
|
||||
====
|
||||
|
||||
You can choose to enable `DiscoveryClient` from all namespaces by setting the following property in `application.properties`:
|
||||
|
||||
====
|
||||
[source]
|
||||
----
|
||||
spring.cloud.kubernetes.discovery.all-namespaces=true
|
||||
----
|
||||
====
|
||||
|
||||
If, for any reason, you need to disable the `DiscoveryClient`, you can set the following property in `application.properties`:
|
||||
|
||||
====
|
||||
@@ -124,6 +133,8 @@ spring.cloud.kubernetes.discovery.enabled=false
|
||||
Some Spring Cloud components use the `DiscoveryClient` in order to obtain information about the local service instance. For
|
||||
this to work, you need to align the Kubernetes service name with the `spring.application.name` property.
|
||||
|
||||
NOTE: `spring.application.name` has no effect as far as the name registered for the application within Kubernetes
|
||||
|
||||
Spring Cloud Kubernetes can also watch the Kubernetes service catalog for changes and update the
|
||||
`DiscoveryClient` implementation accordingly. In order to enable this functionality you need to add
|
||||
`@EnableScheduling` on a configuration class in your application.
|
||||
@@ -324,6 +335,59 @@ However, if the `production` profile is active, the configuration becomes:
|
||||
|
||||
If both profiles are active, the property that appears last within the `ConfigMap` overwrites any preceding values.
|
||||
|
||||
Another option is to create a different config map per profile and spring boot will automatically fetch it based
|
||||
on active profiles
|
||||
|
||||
====
|
||||
[source,yaml]
|
||||
----
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: demo
|
||||
data:
|
||||
application.yml: |-
|
||||
greeting:
|
||||
message: Say Hello to the World
|
||||
farewell:
|
||||
message: Say Goodbye
|
||||
----
|
||||
====
|
||||
====
|
||||
[source,yaml]
|
||||
----
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: demo-development
|
||||
data:
|
||||
application.yml: |-
|
||||
spring:
|
||||
profiles: development
|
||||
greeting:
|
||||
message: Say Hello to the Developers
|
||||
farewell:
|
||||
message: Say Goodbye to the Developers
|
||||
----
|
||||
====
|
||||
====
|
||||
[source,yaml]
|
||||
----
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: demo-production
|
||||
data:
|
||||
application.yml: |-
|
||||
spring:
|
||||
profiles: production
|
||||
greeting:
|
||||
message: Say Hello to the Ops
|
||||
farewell:
|
||||
message: Say Goodbye
|
||||
----
|
||||
====
|
||||
|
||||
|
||||
To tell Spring Boot which `profile` should be enabled at bootstrap, you can pass a system property to the Java
|
||||
command. To do so, you can launch your Spring Boot application with an environment variable that you can define with the OpenShift
|
||||
@@ -362,7 +426,7 @@ NOTE: You have to provide the full exact path to each property file, because dir
|
||||
[options="header,footer"]
|
||||
|===
|
||||
| Name | Type | Default | Description
|
||||
| `spring.cloud.kubernetes.config.enabled` | `Boolean` | `true` | Enable Secrets `PropertySource`
|
||||
| `spring.cloud.kubernetes.config.enabled` | `Boolean` | `true` | Enable ConfigMaps `PropertySource`
|
||||
| `spring.cloud.kubernetes.config.name` | `String` | `${spring.application.name}` | Sets the name of `ConfigMap` to look up
|
||||
| `spring.cloud.kubernetes.config.namespace` | `String` | Client namespace | Sets the Kubernetes namespace where to lookup
|
||||
| `spring.cloud.kubernetes.config.paths` | `List` | `null` | Sets the paths where `ConfigMap` instances are mounted
|
||||
@@ -381,10 +445,13 @@ When enabled, the `SecretsPropertySource` looks up Kubernetes for `Secrets` from
|
||||
. Named after the application (as defined by `spring.application.name`)
|
||||
. Matching some labels
|
||||
|
||||
Note that, by default, consuming Secrets through the API (points 2 and 3 above) *is not enabled* for security reasons.
|
||||
*Note:*
|
||||
|
||||
By default, consuming Secrets through the API (points 2 and 3 above) *is not enabled* for security reasons. The permission 'list' on secrets allows clients to inspect secrets values in the specified namespace.
|
||||
Further, we recommend that containers share secrets through mounted volumes.
|
||||
If you enable consuming Secrets through the API, we recommend that you limit access to Secrets by using an
|
||||
[authorization policy, such as RBAC](https://kubernetes.io/docs/concepts/configuration/secret/#best-practices).
|
||||
|
||||
If you enable consuming Secrets through the API, we recommend that you limit access to Secrets by using an authorization policy, such as RBAC.
|
||||
For more information about risks and best practices when consuming Secrets through the API refer to https://kubernetes.io/docs/concepts/configuration/secret/#best-practices[this doc].
|
||||
|
||||
If the secrets are found, their data is made available to the application.
|
||||
|
||||
@@ -500,6 +567,7 @@ If you have all the secrets mapped to a common root, you can set them like:
|
||||
|===
|
||||
|
||||
Notes:
|
||||
|
||||
* The `spring.cloud.kubernetes.secrets.labels` property behaves as defined by
|
||||
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Configuration-Binding#map-based-binding[Map-based binding].
|
||||
* The `spring.cloud.kubernetes.secrets.paths` property behaves as defined by
|
||||
@@ -987,6 +1055,7 @@ $ touch .springformat
|
||||
==== Intellij IDEA
|
||||
|
||||
In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin.
|
||||
The following files can be found in the https://github.com/spring-cloud/spring-cloud-build/tree/master/spring-cloud-build-tools[Spring Cloud Build] project.
|
||||
|
||||
.spring-cloud-build-tools/
|
||||
----
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<packaging>pom</packaging>
|
||||
<name>Spring Cloud Kubernetes Docs</name>
|
||||
|
||||
10
pom.xml
10
pom.xml
@@ -24,13 +24,13 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-build</artifactId>
|
||||
<version>2.1.7.BUILD-SNAPSHOT</version>
|
||||
<version>2.1.7.RELEASE</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Spring Cloud Kubernetes</name>
|
||||
|
||||
@@ -63,9 +63,9 @@
|
||||
|
||||
<properties>
|
||||
<!-- Dependency Versions -->
|
||||
<spring-cloud-commons.version>2.1.3.BUILD-SNAPSHOT</spring-cloud-commons.version>
|
||||
<spring-cloud-netflix.version>2.1.3.BUILD-SNAPSHOT</spring-cloud-netflix.version>
|
||||
<spring-cloud-config.version>2.1.4.BUILD-SNAPSHOT</spring-cloud-config.version>
|
||||
<spring-cloud-commons.version>2.1.3.RELEASE</spring-cloud-commons.version>
|
||||
<spring-cloud-netflix.version>2.1.3.RELEASE</spring-cloud-netflix.version>
|
||||
<spring-cloud-config.version>2.1.4.RELEASE</spring-cloud-config.version>
|
||||
|
||||
<!-- Maven Plugin Versions -->
|
||||
<maven-compiler-plugin.version>3.5</maven-compiler-plugin.version>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-dependencies-parent</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>2.1.7.BUILD-SNAPSHOT</version>
|
||||
<version>2.1.7.RELEASE</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-kubernetes-dependencies</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Spring Cloud Kubernetes :: Dependencies</name>
|
||||
<description>Spring Cloud Kubernetes Dependencies</description>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>kubernetes-circuitbreaker-ribbon-example</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>greeting-service</artifactId>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>kubernetes-circuitbreaker-ribbon-example</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>name-service</artifactId>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes-examples</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes-examples</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes-examples</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>kubernetes-leader-election-example</artifactId>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes-examples</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes-examples</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>spring-cloud-kubernetes-examples</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>discovery-parent</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>discovery-client</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>discovery-parent</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>discovery-service-a</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>discovery-parent</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>discovery-service-b</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<name>Spring Cloud Kubernetes :: Integration Tests :: Discovery Parent</name>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>discovery-parent</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>tests</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<name>Spring Cloud Kubernetes :: Integration Tests :: Istio</name>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<name>Spring Cloud Kubernetes :: Integration Tests :: Simple Configmap</name>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<name>Spring Cloud Kubernetes :: Integration Tests :: Simple Core</name>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>spring-cloud-kubernetes-leader</artifactId>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-kubernetes</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.0.3.BUILD-SNAPSHOT</version>
|
||||
<version>1.0.3.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user