Going back to snapshots

This commit is contained in:
buildmaster
2019-09-09 19:13:55 +00:00
parent 66ead19d43
commit 29c00bbf3f
31 changed files with 39 additions and 108 deletions

View File

@@ -112,15 +112,6 @@ 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`:
====
@@ -133,8 +124,6 @@ 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.
@@ -335,59 +324,6 @@ 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
@@ -426,7 +362,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 ConfigMaps `PropertySource`
| `spring.cloud.kubernetes.config.enabled` | `Boolean` | `true` | Enable Secrets `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
@@ -445,13 +381,10 @@ When enabled, the `SecretsPropertySource` looks up Kubernetes for `Secrets` from
. Named after the application (as defined by `spring.application.name`)
. Matching some labels
*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.
Note that, by default, consuming Secrets through the API (points 2 and 3 above) *is not enabled* for security reasons.
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.
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 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 the secrets are found, their data is made available to the application.
@@ -567,7 +500,6 @@ 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
@@ -1055,7 +987,6 @@ $ 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/
----

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<packaging>pom</packaging>
<name>Spring Cloud Kubernetes Docs</name>

10
pom.xml
View File

@@ -24,13 +24,13 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>2.1.7.RELEASE</version>
<version>2.1.7.BUILD-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Cloud Kubernetes</name>
@@ -63,9 +63,9 @@
<properties>
<!-- Dependency Versions -->
<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>
<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>
<!-- Maven Plugin Versions -->
<maven-compiler-plugin.version>3.5</maven-compiler-plugin.version>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-kubernetes</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -22,7 +22,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -23,11 +23,11 @@
<parent>
<artifactId>spring-cloud-dependencies-parent</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>2.1.7.RELEASE</version>
<version>2.1.7.BUILD-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>spring-cloud-kubernetes-dependencies</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Cloud Kubernetes :: Dependencies</name>
<description>Spring Cloud Kubernetes Dependencies</description>

View File

@@ -22,7 +22,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -23,7 +23,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>kubernetes-circuitbreaker-ribbon-example</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<artifactId>greeting-service</artifactId>

View File

@@ -23,7 +23,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>kubernetes-circuitbreaker-ribbon-example</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<artifactId>name-service</artifactId>

View File

@@ -23,7 +23,7 @@
<parent>
<artifactId>spring-cloud-kubernetes-examples</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<groupId>org.springframework.cloud</groupId>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-kubernetes-examples</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-examples</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<artifactId>kubernetes-leader-election-example</artifactId>

View File

@@ -22,7 +22,7 @@
<parent>
<artifactId>spring-cloud-kubernetes-examples</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -22,7 +22,7 @@
<parent>
<artifactId>spring-cloud-kubernetes-examples</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -23,7 +23,7 @@
<parent>
<artifactId>spring-cloud-kubernetes</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<artifactId>spring-cloud-kubernetes-examples</artifactId>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>discovery-parent</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<artifactId>discovery-client</artifactId>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>discovery-parent</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<artifactId>discovery-service-a</artifactId>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>discovery-parent</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<artifactId>discovery-service-b</artifactId>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<name>Spring Cloud Kubernetes :: Integration Tests :: Discovery Parent</name>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>discovery-parent</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<artifactId>tests</artifactId>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<name>Spring Cloud Kubernetes :: Integration Tests :: Istio</name>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<name>Spring Cloud Kubernetes :: Integration Tests :: Simple Configmap</name>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<name>Spring Cloud Kubernetes :: Integration Tests :: Simple Core</name>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-kubernetes</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -22,7 +22,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes</artifactId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<artifactId>spring-cloud-kubernetes-leader</artifactId>

View File

@@ -22,7 +22,7 @@
<parent>
<artifactId>spring-cloud-kubernetes</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -22,7 +22,7 @@
<parent>
<artifactId>spring-cloud-kubernetes</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -22,7 +22,7 @@
<parent>
<artifactId>spring-cloud-kubernetes</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -22,7 +22,7 @@
<parent>
<artifactId>spring-cloud-kubernetes</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -22,7 +22,7 @@
<parent>
<artifactId>spring-cloud-kubernetes</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.0.3.RELEASE</version>
<version>1.0.3.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>