File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import (
3333
3434 adctypes "github.com/apache/apisix-ingress-controller/api/adc"
3535 "github.com/apache/apisix-ingress-controller/internal/adc/cache"
36+ "github.com/apache/apisix-ingress-controller/internal/controller/label"
3637 "github.com/apache/apisix-ingress-controller/internal/provider/common"
3738 "github.com/apache/apisix-ingress-controller/internal/types"
3839 pkgmetrics "github.com/apache/apisix-ingress-controller/pkg/metrics"
@@ -223,6 +224,11 @@ func (c *Client) Sync(ctx context.Context) (map[string]types.ADCExecutionErrors,
223224func (c * Client ) sync (ctx context.Context , task Task ) error {
224225 log .Debugw ("syncing resources" , zap .Any ("task" , task ))
225226
227+ if len (task .Labels ) > 0 {
228+ // only keep the resource key label for filtering resources
229+ task .Labels = map [string ]string {label .LabelResourceKey : task .Labels [label .LabelResourceKey ]}
230+ }
231+
226232 if len (task .Configs ) == 0 {
227233 log .Warnw ("no adc configs provided" , zap .Any ("task" , task ))
228234 return nil
You can’t perform that action at this time.
0 commit comments