Merge branch '2.1.x'
This commit is contained in:
@@ -50,8 +50,8 @@
|
||||
|spring.cloud.kubernetes.config.enable-api | `+++true+++` |
|
||||
|spring.cloud.kubernetes.config.enabled | `+++true+++` | Enable the ConfigMap property source locator.
|
||||
|spring.cloud.kubernetes.config.fail-fast | `+++false+++` |
|
||||
|spring.cloud.kubernetes.config.include-profile-specific-sources | `+++true+++` |
|
||||
|spring.cloud.kubernetes.config.labels | |
|
||||
|spring.cloud.kubernetes.config.include-profile-specific-sources | `+++true+++` |
|
||||
|spring.cloud.kubernetes.config.labels | |
|
||||
|spring.cloud.kubernetes.config.name | |
|
||||
|spring.cloud.kubernetes.config.namespace | |
|
||||
|spring.cloud.kubernetes.config.paths | |
|
||||
@@ -77,7 +77,8 @@
|
||||
|spring.cloud.kubernetes.discovery.order | |
|
||||
|spring.cloud.kubernetes.discovery.primary-port-name | | If set then the port with a given name is used as primary when multiple ports are defined for a service.
|
||||
|spring.cloud.kubernetes.discovery.service-labels | | If set, then only the services matching these labels will be fetched from the Kubernetes API server.
|
||||
|spring.cloud.kubernetes.discovery.wait-cache-ready | `+++true+++` |
|
||||
|spring.cloud.kubernetes.discovery.wait-cache-ready | `+++true+++` |
|
||||
|spring.cloud.kubernetes.enabled | `+++true+++` | Whether to enable Kubernetes integration.
|
||||
|spring.cloud.kubernetes.leader.auto-startup | `+++true+++` | Should leader election be started automatically on startup. Default: true
|
||||
|spring.cloud.kubernetes.leader.config-map-name | `+++leaders+++` | Kubernetes ConfigMap where leaders information will be stored. Default: leaders
|
||||
|spring.cloud.kubernetes.leader.enabled | `+++true+++` | Should leader election be enabled. Default: true
|
||||
@@ -115,4 +116,4 @@
|
||||
|spring.cloud.kubernetes.secrets.sources | |
|
||||
|spring.cloud.kubernetes.secrets.use-name-as-prefix | `+++false+++` |
|
||||
|
||||
|===
|
||||
|===
|
||||
|
||||
@@ -19,8 +19,6 @@ package org.springframework.cloud.kubernetes.client.config;
|
||||
import io.kubernetes.client.openapi.apis.CoreV1Api;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnCloudPlatform;
|
||||
import org.springframework.boot.cloud.CloudPlatform;
|
||||
import org.springframework.cloud.kubernetes.client.KubernetesClientAutoConfiguration;
|
||||
import org.springframework.cloud.kubernetes.commons.ConditionalOnKubernetesConfigEnabled;
|
||||
import org.springframework.cloud.kubernetes.commons.ConditionalOnKubernetesSecretsEnabled;
|
||||
@@ -41,7 +39,6 @@ import org.springframework.context.annotation.Import;
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@AutoConfigureAfter(KubernetesBootstrapConfiguration.class)
|
||||
@Import({ KubernetesCommonsAutoConfiguration.class, KubernetesClientAutoConfiguration.class })
|
||||
@ConditionalOnCloudPlatform(CloudPlatform.KUBERNETES)
|
||||
public class KubernetesClientBootstrapConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -20,8 +20,6 @@ import io.kubernetes.client.openapi.apis.CoreV1Api;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnCloudPlatform;
|
||||
import org.springframework.boot.cloud.CloudPlatform;
|
||||
import org.springframework.cloud.kubernetes.client.KubernetesClientAutoConfiguration;
|
||||
import org.springframework.cloud.kubernetes.commons.KubernetesCommonsAutoConfiguration;
|
||||
import org.springframework.cloud.kubernetes.commons.KubernetesNamespaceProvider;
|
||||
@@ -42,7 +40,6 @@ import org.springframework.context.annotation.Import;
|
||||
@AutoConfigureAfter(KubernetesBootstrapConfiguration.class)
|
||||
@AutoConfigureBefore(KubernetesClientBootstrapConfiguration.class)
|
||||
@Import({ KubernetesCommonsAutoConfiguration.class, KubernetesClientAutoConfiguration.class })
|
||||
@ConditionalOnCloudPlatform(CloudPlatform.KUBERNETES)
|
||||
@ConditionalOnKubernetesConfigOrSecretsRetryEnabled
|
||||
public class KubernetesClientRetryBootstrapConfiguration {
|
||||
|
||||
|
||||
@@ -67,8 +67,14 @@ public abstract class ConfigMapWatcherChangeDetector extends KubernetesClientEve
|
||||
+ configMap.getMetadata().getName() + " to be published in "
|
||||
+ k8SConfigurationProperties.getRefreshDelay().toMillis() + " milliseconds");
|
||||
}
|
||||
executorService.schedule(() -> triggerRefresh(configMap).subscribe(),
|
||||
k8SConfigurationProperties.getRefreshDelay().toMillis(), TimeUnit.MILLISECONDS);
|
||||
executorService.schedule(() -> {
|
||||
try {
|
||||
triggerRefresh(configMap).subscribe();
|
||||
}
|
||||
catch (Throwable t) {
|
||||
log.warn("Error when refreshing ConfigMap " + configMap.getMetadata().getName(), t);
|
||||
}
|
||||
}, k8SConfigurationProperties.getRefreshDelay().toMillis(), TimeUnit.MILLISECONDS);
|
||||
}
|
||||
else {
|
||||
if (log.isDebugEnabled()) {
|
||||
|
||||
@@ -76,8 +76,14 @@ public abstract class SecretsWatcherChangeDetector extends KubernetesClientEvent
|
||||
+ " to be published in " + k8SConfigurationProperties.getRefreshDelay().toMillis()
|
||||
+ " milliseconds");
|
||||
}
|
||||
executorService.schedule(() -> triggerRefresh(secret).subscribe(),
|
||||
k8SConfigurationProperties.getRefreshDelay().toMillis(), TimeUnit.MILLISECONDS);
|
||||
executorService.schedule(() -> {
|
||||
try {
|
||||
triggerRefresh(secret).subscribe();
|
||||
}
|
||||
catch (Throwable t) {
|
||||
log.warn("Error when refreshing ConfigMap " + secret.getMetadata().getName(), t);
|
||||
}
|
||||
}, k8SConfigurationProperties.getRefreshDelay().toMillis(), TimeUnit.MILLISECONDS);
|
||||
}
|
||||
else {
|
||||
if (log.isDebugEnabled()) {
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = ExampleApp.class,
|
||||
properties = { "spring.cloud.bootstrap.name=multiplecms", "spring.main.cloud-platform=KUBERNETES" })
|
||||
properties = { "spring.cloud.bootstrap.name=multiplecms" })
|
||||
@AutoConfigureWebTestClient
|
||||
@EnableKubernetesMockClient(crud = true, https = false)
|
||||
abstract class MultipleConfigMapsTests {
|
||||
|
||||
Reference in New Issue
Block a user