File tree Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -81,21 +81,9 @@ require (
81
81
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
82
82
gopkg.in/inf.v0 v0.9.1 // indirect
83
83
gopkg.in/yaml.v2 v2.4.0 // indirect
84
- <<<<<<< HEAD
85
84
gopkg.in/yaml.v3 v3.0.0 // indirect
86
85
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
87
- k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
88
86
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
89
- ||||||| parent of 2b4874e5 (Add kube_pod_ips gauge to pod metrics)
90
- gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
91
- k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
92
- k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
93
- sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
94
- =======
95
- gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
96
- k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
97
- sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
98
- >>>>>>> 2b4874e5 (Add kube_pod_ips gauge to pod metrics)
99
87
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
100
88
sigs.k8s.io/yaml v1.3.0 // indirect
101
89
)
Original file line number Diff line number Diff line change @@ -596,10 +596,13 @@ func createPodIPFamilyGenerator() generator.FamilyGenerator {
596
596
for i , ip := range p .Status .PodIPs {
597
597
netIP := net .ParseIPSloppy (ip .IP )
598
598
var ipFamily net.IPFamily
599
- if net .IsIPv4 (netIP ) {
599
+ switch {
600
+ case net .IsIPv4 (netIP ):
600
601
ipFamily = net .IPv4
601
- } else {
602
+ case net . IsIPv6 ( netIP ):
602
603
ipFamily = net .IPv6
604
+ default :
605
+ continue // nil from ParseIPSloppy indicates failure to parse, so we don't include that in our metrics series
603
606
}
604
607
ms [i ] = & metric.Metric {
605
608
LabelKeys : labelKeys ,
You can’t perform that action at this time.
0 commit comments