Skip to content

Commit 5f0581e

Browse files
committed
Include resources with kubernetes.io prefix.
#1939 (comment)
1 parent eac6d3b commit 5f0581e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

internal/store/utils.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,7 @@ func isExtendedResourceName(name v1.ResourceName) bool {
165165
}
166166

167167
func isNativeResource(name v1.ResourceName) bool {
168-
return !strings.Contains(string(name), "/") ||
169-
isPrefixedNativeResource(name)
170-
}
171-
172-
func isPrefixedNativeResource(name v1.ResourceName) bool {
173-
return strings.Contains(string(name), v1.ResourceDefaultNamespacePrefix)
168+
return !strings.Contains(string(name), "/")
174169
}
175170

176171
// createPrometheusLabelKeysValues takes in passed kubernetes annotations/labels

internal/store/utils_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func TestIsExtendedResourceName(t *testing.T) {
9393
},
9494
{
9595
resourceName: "kubernetes.io/resource-foo",
96-
expectVal: false,
96+
expectVal: true,
9797
},
9898
{
9999
resourceName: "foo",

0 commit comments

Comments
 (0)