Skip to content

Commit

Permalink
fixup! fixup! fixup! Allow labelFromKey field
Browse files Browse the repository at this point in the history
  • Loading branch information
rexagod committed Nov 9, 2022
1 parent a1716fa commit b9f0d8d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/customresourcestate/registry_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ func (c *compiledInfo) Values(v interface{}) (result []eachValue, errs []error)
onError(err...)
break
}
for _, ev := range value {
if _, ok := ev.Labels[c.labelFromKey]; ok {
onError(fmt.Errorf("labelFromKey (%s) generated labels conflict with labelsFromPath, consider renaming it", c.labelFromKey))
continue
}
}
// labelFromKey logic
for key := range iter {
if key != "" && c.labelFromKey != "" {
Expand Down

0 comments on commit b9f0d8d

Please sign in to comment.