Skip to content

Commit fb5054b

Browse files
committed
fix: r
Signed-off-by: Ashing Zheng <[email protected]>
1 parent 84fe198 commit fb5054b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

internal/controller/label/label.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const (
3333
LabelNamespace = "k8s/namespace"
3434
LabelControllerName = "k8s/controller-name"
3535
LabelManagedBy = "manager-by"
36-
LabelID = "k8s/uid"
36+
LabelResourceKey = "k8s/resource-key"
3737
)
3838

3939
func GenLabel(obj client.Object, args ...string) Label {
@@ -43,7 +43,7 @@ func GenLabel(obj client.Object, args ...string) Label {
4343
label[LabelName] = obj.GetName()
4444
label[LabelControllerName] = config.ControllerConfig.ControllerName
4545
label[LabelManagedBy] = "apisix-ingress-controller"
46-
label[LabelID] = fmt.Sprintf("%s/%s/%s", label[LabelKind], label[LabelNamespace], label[LabelName])
46+
label[LabelResourceKey] = fmt.Sprintf("%s/%s/%s", label[LabelKind], label[LabelNamespace], label[LabelName])
4747
for i := 0; i < len(args); i += 2 {
4848
label[args[i]] = args[i+1]
4949
}

internal/provider/adc/adc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ func (d *adcClient) sync(ctx context.Context, task Task) error {
415415
log.Debugw("syncing resources", zap.Any("task", task))
416416
if len(task.Labels) > 0 {
417417
// only keep the id label for filtering resources
418-
task.Labels = map[string]string{label.LabelID: task.Labels[label.LabelID]}
418+
task.Labels = map[string]string{label.LabelResourceKey: task.Labels[label.LabelResourceKey]}
419419
}
420420

421421
if len(task.configs) == 0 {

0 commit comments

Comments
 (0)