Merge pull request #1823 from huanggze/release-2.1

fix doc-gen conflict
This commit is contained in:
KubeSphere CI Bot
2020-02-11 15:04:32 +08:00
committed by GitHub

View File

@@ -520,9 +520,13 @@ var metricsPromqlMap = map[string]string{
// As of Kubernetes v1.16, any Prometheus queries that match `pod_name` and
// `container_name` labels must be updated to use `pod` and `container` instead.
func CompatibleMetrics() {
if client.ClientSets() == nil {
return
}
version, err := client.ClientSets().K8s().Discovery().ServerVersion()
if err != nil {
klog.Errorf("fail to fetch k8s version: %v", err)
klog.Errorf("fail to fetch k8s version: %v.", err)
return
}