Add ability to collect pod labels to Kubernetes input (#6764)

This commit is contained in:
LinaLinn
2019-12-12 23:14:37 +01:00
committed by Daniel Nelson
parent 4fbba13622
commit f79ba10ab3
4 changed files with 161 additions and 41 deletions

View File

@@ -0,0 +1,17 @@
package kubernetes
type Pods struct {
Kind string `json:"kind"`
ApiVersion string `json:"apiVersion"`
Items []Item `json:"items"`
}
type Item struct {
Metadata Metadata `json:"metadata"`
}
type Metadata struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Labels map[string]string `json:"labels"`
}