From d73801e7a55e6eeaff93b46f0fdacfa248b355bf Mon Sep 17 00:00:00 2001 From: erabii Date: Mon, 1 Nov 2021 11:10:31 -0400 Subject: [PATCH] tighter documentation and drop a log statement (#899) * fix * fix documentation --- docs/src/main/asciidoc/property-source-config.adoc | 3 ++- .../cloud/kubernetes/fabric8/Fabric8AutoConfiguration.java | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/src/main/asciidoc/property-source-config.adoc b/docs/src/main/asciidoc/property-source-config.adoc index e27573bb..719f06e6 100644 --- a/docs/src/main/asciidoc/property-source-config.adoc +++ b/docs/src/main/asciidoc/property-source-config.adoc @@ -680,7 +680,8 @@ Remember that the same can be done for config maps. If such a namespace is not s 3. from a String residing in `/var/run/secrets/kubernetes.io/serviceaccount/namespace` file (kubernetes default namespace path) 4. from a designated client method call (for example fabric8's : `KubernetesClient::getNamespace`), if the client provides -such a method. +such a method. This, in turn, could be configured via environment properties. For example fabric8 client can be configured via +"KUBERNETES_NAMESPACE" property; consult the client documentation for exact details. Failure to find a namespace from the above steps will result in an Exception being raised. diff --git a/spring-cloud-kubernetes-fabric8-autoconfig/src/main/java/org/springframework/cloud/kubernetes/fabric8/Fabric8AutoConfiguration.java b/spring-cloud-kubernetes-fabric8-autoconfig/src/main/java/org/springframework/cloud/kubernetes/fabric8/Fabric8AutoConfiguration.java index 722b5e8b..8697a8d8 100644 --- a/spring-cloud-kubernetes-fabric8-autoconfig/src/main/java/org/springframework/cloud/kubernetes/fabric8/Fabric8AutoConfiguration.java +++ b/spring-cloud-kubernetes-fabric8-autoconfig/src/main/java/org/springframework/cloud/kubernetes/fabric8/Fabric8AutoConfiguration.java @@ -98,10 +98,6 @@ public class Fabric8AutoConfiguration { .withProxyPassword(or(kubernetesClientProperties.getProxyPassword(), base.getProxyPassword())) .withNoProxy(or(kubernetesClientProperties.getNoProxy(), base.getNoProxy())).build(); - if (properties.getNamespace() == null || properties.getNamespace().isEmpty()) { - LOG.warn("No namespace has been detected. Please specify " - + "KUBERNETES_NAMESPACE env var, or use a later kubernetes version (1.3 or later)"); - } return properties; }