Collect k8s endpoints, ingress, and services in kube_inventory plugin (#6105)

This commit is contained in:
Greg
2019-07-19 14:18:50 -06:00
committed by Daniel Nelson
parent bdb4598b3f
commit 877c42362d
10 changed files with 709 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import (
"testing"
"time"
"github.com/ericchiang/k8s/util/intstr"
"github.com/influxdata/telegraf/internal/tls"
)
@@ -27,6 +28,13 @@ func toBoolPtr(b bool) *bool {
return &b
}
func toIntStrPtrS(s string) *intstr.IntOrString {
return &intstr.IntOrString{StrVal: &s}
}
func toIntStrPtrI(i int32) *intstr.IntOrString {
return &intstr.IntOrString{IntVal: &i}
}
func TestNewClient(t *testing.T) {
_, err := newClient("https://127.0.0.1:443/", "default", "abc123", time.Second, tls.ClientConfig{})
if err != nil {