From b78badf487333f2e7518d22f66fc61953fca1c11 Mon Sep 17 00:00:00 2001 From: Li Liang Date: Tue, 2 Apr 2019 11:13:41 +0800 Subject: [PATCH] Use github.com/ghodss/yaml to parse k8s config (#5642) --- Gopkg.lock | 9 +++++++++ Gopkg.toml | 4 ++++ plugins/inputs/prometheus/kubernetes.go | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Gopkg.lock b/Gopkg.lock index cc00c787c3296..67654d523706d 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -403,6 +403,14 @@ revision = "d1bbc0cffaf9849ddcae7b9efffae33e2dd52e9a" version = "v1.2.0" +[[projects]] + branch = "master" + digest = "1:ec95c1c49fbec27ab5383b9c47fae5c2fe1d97ac5b41d36d78e17588a44e9f3f" + name = "github.com/ghodss/yaml" + packages = ["."] + pruneopts = "" + revision = "25d852aebe32c875e9c044af3eef9c7dc6bc777f" + [[projects]] digest = "1:858b7fe7b0f4bc7ef9953926828f2816ea52d01a88d72d1c45bc8c108f23c356" name = "github.com/go-ini/ini" @@ -1547,6 +1555,7 @@ "github.com/ericchiang/k8s/apis/meta/v1", "github.com/ericchiang/k8s/apis/resource", "github.com/ericchiang/k8s/util/intstr", + "github.com/ghodss/yaml", "github.com/go-logfmt/logfmt", "github.com/go-redis/redis", "github.com/go-sql-driver/mysql", diff --git a/Gopkg.toml b/Gopkg.toml index d9475a5043c8f..bfc8544507900 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -269,6 +269,10 @@ name = "github.com/go-logfmt/logfmt" version = "0.4.0" +[[constraint]] + branch = "master" + name = "github.com/ghodss/yaml" + [[override]] name = "golang.org/x/crypto" source = "https://github.com/golang/crypto.git" diff --git a/plugins/inputs/prometheus/kubernetes.go b/plugins/inputs/prometheus/kubernetes.go index 87db15ffe0539..0d86ad91e4ab6 100644 --- a/plugins/inputs/prometheus/kubernetes.go +++ b/plugins/inputs/prometheus/kubernetes.go @@ -14,7 +14,7 @@ import ( "github.com/ericchiang/k8s" corev1 "github.com/ericchiang/k8s/apis/core/v1" - "gopkg.in/yaml.v2" + "github.com/ghodss/yaml" ) type payload struct {