Add spring.cloud.kubernetes.enabled as a metadata (#522)
This commit is contained in:
committed by
GitHub
parent
6d1a4b0557
commit
7ed9ff596b
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.core.style.ToStringCreator;
|
||||
|
||||
/**
|
||||
* Kubernetes properties.
|
||||
*
|
||||
* @author Tim Ysewyn
|
||||
*/
|
||||
@ConfigurationProperties("spring.cloud.kubernetes")
|
||||
public class KubernetesProperties {
|
||||
|
||||
/** If Kubernetes integration is enabled. */
|
||||
private boolean enabled = true;
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringCreator(this).append("enabled", this.enabled).toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -119,6 +119,12 @@
|
||||
"type": "java.time.Duration",
|
||||
"description": "Logging interval",
|
||||
"defaultValue": "20s"
|
||||
},
|
||||
{
|
||||
"name": "spring.cloud.kubernetes.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable Kubernetes integration.",
|
||||
"defaultValue": "true"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user