Skip to content

Commit

Permalink
feat: sync consumer crd labels to apisix
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek committed Dec 17, 2022
1 parent d22a6fc commit feb0f42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/providers/apisix/translation/apisix_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ func (t *translator) TranslateApisixConsumerV2(ac *configv2.ApisixConsumer) (*ap
}

consumer := apisixv1.NewDefaultConsumer()
for k, v := range ac.ObjectMeta.Labels {
consumer.Labels[k] = v
}
consumer.Username = apisixv1.ComposeConsumerName(ac.Namespace, ac.Name)
consumer.Plugins = plugins
return consumer, nil
Expand Down

0 comments on commit feb0f42

Please sign in to comment.