File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -56,18 +56,16 @@ func createServiceAccountInfoFamilyGenerator() generator.FamilyGenerator {
56
56
basemetrics .ALPHA ,
57
57
"" ,
58
58
wrapServiceAccountFunc (func (sa * v1.ServiceAccount ) * metric.Family {
59
- var labelKeys []string
60
- var labelValues []string
59
+ var automountToken string
61
60
62
61
if sa .AutomountServiceAccountToken != nil {
63
- labelKeys = append (labelKeys , "automount_token" )
64
- labelValues = append (labelValues , strconv .FormatBool (* sa .AutomountServiceAccountToken ))
62
+ automountToken = strconv .FormatBool (* sa .AutomountServiceAccountToken )
65
63
}
66
64
67
65
return & metric.Family {
68
66
Metrics : []* metric.Metric {{
69
- LabelKeys : labelKeys ,
70
- LabelValues : labelValues ,
67
+ LabelKeys : [] string { "automount_token" } ,
68
+ LabelValues : [] string { automountToken } ,
71
69
Value : 1 ,
72
70
}},
73
71
}
You can’t perform that action at this time.
0 commit comments