Summary
Please triage whether ApisixConsumer should support user-defined consumer labels in addition to the controller-generated labels.
Current behavior
APISIX itself supports consumer labels, but ApisixConsumer does not currently provide a way to define custom labels on the APISIX consumer.
From the current implementation:
ApisixConsumer does not expose a field for consumer custom labels
- the translator sets
consumer.Labels = label.GenLabel(ac)
label.GenLabel only generates controller metadata labels such as kind, name, namespace, and resource key
As a result, consumer label use cases supported by APISIX cannot currently be expressed through ApisixConsumer.
Use cases affected
- setting business or tenant labels on a consumer
- using those labels in workflows that depend on consumer label metadata, such as
attach-consumer-label
Code context
api/v2/apisixconsumer_types.go
internal/adc/translator/apisixconsumer.go
internal/controller/label/label.go
Summary
Please triage whether
ApisixConsumershould support user-defined consumer labels in addition to the controller-generated labels.Current behavior
APISIX itself supports consumer labels, but
ApisixConsumerdoes not currently provide a way to define custom labels on the APISIX consumer.From the current implementation:
ApisixConsumerdoes not expose a field for consumer custom labelsconsumer.Labels = label.GenLabel(ac)label.GenLabelonly generates controller metadata labels such as kind, name, namespace, and resource keyAs a result, consumer label use cases supported by APISIX cannot currently be expressed through
ApisixConsumer.Use cases affected
attach-consumer-labelCode context
api/v2/apisixconsumer_types.gointernal/adc/translator/apisixconsumer.gointernal/controller/label/label.go