You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2020/11/03 09:54:57 UTC
[skywalking] branch master updated: Fixed unit of time mixing
problem in kubernetes-client (#5777)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new cf563fc Fixed unit of time mixing problem in kubernetes-client (#5777)
cf563fc is described below
commit cf563fcf58af63fcafe4bdac44a76c54680afd5e
Author: Evan <31...@users.noreply.github.com>
AuthorDate: Tue Nov 3 17:54:33 2020 +0800
Fixed unit of time mixing problem in kubernetes-client (#5777)
---
CHANGES.md | 1 +
.../cluster/plugin/kubernetes/NamespacedPodListInformer.java | 2 +-
.../configuration/configmap/ConfigurationConfigmapInformer.java | 2 +-
.../oap/server/receiver/envoy/als/k8s/K8SServiceRegistry.java | 9 +++++----
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index d81e37e..70c753d 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -23,6 +23,7 @@ Release Notes.
* Support choose files to active the meter analyzer.
* Improve Kubernetes service registry for ALS analysis.
* Improve the queryable tags generation. Remove the duplicated tags to reduce the storage payload.
+* Fix the excessive timeout period set by the kubernetes-client.
#### UI
diff --git a/oap-server/server-cluster-plugin/cluster-kubernetes-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/kubernetes/NamespacedPodListInformer.java b/oap-server/server-cluster-plugin/cluster-kubernetes-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/kubernetes/NamespacedPodListInformer.java
index 0b4c93f..de618bc 100644
--- a/oap-server/server-cluster-plugin/cluster-kubernetes-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/kubernetes/NamespacedPodListInformer.java
+++ b/oap-server/server-cluster-plugin/cluster-kubernetes-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/kubernetes/NamespacedPodListInformer.java
@@ -83,7 +83,7 @@ public enum NamespacedPodListInformer {
SharedIndexInformer<V1Pod> podSharedIndexInformer = factory.sharedIndexInformerFor(
params -> coreV1Api.listNamespacedPodCall(
podConfig.getNamespace(), null, null, null, null,
- podConfig.getLabelSelector(), Integer.MAX_VALUE, params.resourceVersion, params.timeoutSeconds,
+ podConfig.getLabelSelector(), Integer.MAX_VALUE, params.resourceVersion, 300,
params.watch, null
),
V1Pod.class, V1PodList.class
diff --git a/oap-server/server-configuration/configuration-k8s-configmap/src/main/java/org/apache/skywalking/oap/server/configuration/configmap/ConfigurationConfigmapInformer.java b/oap-server/server-configuration/configuration-k8s-configmap/src/main/java/org/apache/skywalking/oap/server/configuration/configmap/ConfigurationConfigmapInformer.java
index 101fcfd..d11dfec 100644
--- a/oap-server/server-configuration/configuration-k8s-configmap/src/main/java/org/apache/skywalking/oap/server/configuration/configmap/ConfigurationConfigmapInformer.java
+++ b/oap-server/server-configuration/configuration-k8s-configmap/src/main/java/org/apache/skywalking/oap/server/configuration/configmap/ConfigurationConfigmapInformer.java
@@ -73,7 +73,7 @@ public class ConfigurationConfigmapInformer {
SharedIndexInformer<V1ConfigMap> configMapSharedIndexInformer = factory.sharedIndexInformerFor(
params -> coreV1Api.listNamespacedConfigMapCall(
settings.getNamespace(), null, null, null, null, settings.getLabelSelector()
- , 1, params.resourceVersion, params.timeoutSeconds, params.watch, null
+ , 1, params.resourceVersion, 300, params.watch, null
),
V1ConfigMap.class, V1ConfigMapList.class
);
diff --git a/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/k8s/K8SServiceRegistry.java b/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/k8s/K8SServiceRegistry.java
index 90a1ee6..1f116e9 100644
--- a/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/k8s/K8SServiceRegistry.java
+++ b/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/k8s/K8SServiceRegistry.java
@@ -108,7 +108,7 @@ class K8SServiceRegistry {
null,
null,
params.resourceVersion,
- params.timeoutSeconds,
+ 300,
params.watch,
null
),
@@ -142,7 +142,7 @@ class K8SServiceRegistry {
null,
null,
params.resourceVersion,
- params.timeoutSeconds,
+ 300,
params.watch,
null
),
@@ -176,7 +176,7 @@ class K8SServiceRegistry {
null,
null,
params.resourceVersion,
- params.timeoutSeconds,
+ 300,
params.watch,
null
),
@@ -288,7 +288,8 @@ class K8SServiceRegistry {
log.error("Failed to evaluate service name.", e);
serviceMetaInfo.setServiceName(requireNonNull(service.getMetadata()).getName());
}
- serviceMetaInfo.setServiceInstanceName(String.format("%s.%s", podMetadata.getName(), podMetadata.getNamespace()));
+ serviceMetaInfo.setServiceInstanceName(
+ String.format("%s.%s", podMetadata.getName(), podMetadata.getNamespace()));
serviceMetaInfo.setTags(transformLabelsToTags(podMetadata.getLabels()));
return serviceMetaInfo;