Updated documentation

This commit is contained in:
Tim Ysewyn
2019-12-10 17:23:35 +01:00
parent 1db5e802dd
commit 98c7eb52d8
3 changed files with 49 additions and 1 deletions

View File

@@ -824,6 +824,8 @@ as the code of the project relies on the
https://github.com/fabric8io/kubernetes-client[Fabric8 Kubernetes Java client], which is a fluent DSL that can
communicate by using `http` protocol to the REST API of the Kubernetes Server.
To disable the integration with Kubernetes you can set `spring.cloud.kubernetes.enabled` to `false`.
=== Kubernetes Profile Autoconfiguration
When the application runs as a pod inside Kubernetes, a Spring profile named `kubernetes` automatically gets activated.

View File

@@ -1,7 +1,6 @@
|===
|Name | Default | Description
|spring.cloud.kubernetes.enabled | true | If Kubernetes integration is enabled.
|spring.cloud.kubernetes.client.api-version | |
|spring.cloud.kubernetes.client.apiVersion | v1 | Kubernetes API Version
|spring.cloud.kubernetes.client.ca-cert-data | |
@@ -63,6 +62,7 @@
|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.service-name | unknown | The service name of the local instance.
|spring.cloud.kubernetes.enabled | true | If Kubernetes integration is enabled.
|spring.cloud.kubernetes.reload.enabled | false | Enables the Kubernetes configuration reload on change.
|spring.cloud.kubernetes.reload.max-wait-for-restart | 2s | If Restart or Shutdown strategies are used, Spring Cloud Kubernetes waits a random amount of time before restarting. This is done in order to avoid having all instances of the same application restart at the same time. This property configures the maximum of amount of wait time from the moment the signal is received that a restart is needed until the moment the restart is actually triggered
|spring.cloud.kubernetes.reload.mode | | Sets the detection mode for Kubernetes configuration reload.

View File

@@ -0,0 +1,46 @@
/*
* 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();
}
}