Make Post Processor honor spring.cloud.kubernetes.enabled (#421)
Fixes: #420
This commit is contained in:
committed by
GitHub
parent
35f4e1f94e
commit
fa9483ba24
@@ -42,6 +42,12 @@ public class KubernetesProfileEnvironmentPostProcessor
|
||||
@Override
|
||||
public void postProcessEnvironment(ConfigurableEnvironment environment,
|
||||
SpringApplication application) {
|
||||
|
||||
final String enabledStr = environment.getProperty("spring.cloud.kubernetes.enabled", "false");
|
||||
if ("true".equals(enabledStr.toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
|
||||
final StandardPodUtils podUtils = new StandardPodUtils(
|
||||
new DefaultKubernetesClient());
|
||||
if (podUtils.isInsideKubernetes()) {
|
||||
|
||||
Reference in New Issue
Block a user