1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-01 23:47:50 +00:00

Add support for another field: (#532)

provisioning.cattle.io.clusters\
metadata.annotations[provisioning.cattle.io/management-cluster-display-name]

Needed to add another character to the subfieldRegex in
listoption_indexer to allow hyphens in annotation field names.
This commit is contained in:
Eric Promislow
2025-03-05 12:53:59 -08:00
committed by GitHub
parent 2f331b1a1a
commit f486902100
2 changed files with 2 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ type ListOptionIndexer struct {
var (
defaultIndexedFields = []string{"metadata.name", "metadata.creationTimestamp"}
defaultIndexNamespaced = "metadata.namespace"
subfieldRegex = regexp.MustCompile(`([a-zA-Z]+)|(\[[a-zA-Z./]+])|(\[[0-9]+])`)
subfieldRegex = regexp.MustCompile(`([a-zA-Z]+)|(\[[-a-zA-Z./]+])|(\[[0-9]+])`)
ErrInvalidColumn = errors.New("supplied column is invalid")
)