Skip to content

Commit f1274ab

Browse files
committed
fix: r
Signed-off-by: Ashing Zheng <[email protected]>
1 parent 8d994b6 commit f1274ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/controller/label/label.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
package label
1919

2020
import (
21+
"fmt"
22+
2123
"sigs.k8s.io/controller-runtime/pkg/client"
2224

2325
"github.com/apache/apisix-ingress-controller/internal/controller/config"
@@ -41,7 +43,7 @@ func GenLabel(obj client.Object, args ...string) Label {
4143
label[LabelName] = obj.GetName()
4244
label[LabelControllerName] = config.ControllerConfig.ControllerName
4345
label[LabelManagedBy] = "apisix-ingress-controller"
44-
label[LabelID] = string(obj.GetUID())
46+
label[LabelID] = fmt.Sprintf("%s/%s/%s", label[LabelKind], label[LabelNamespace], label[LabelName])
4547
for i := 0; i < len(args); i += 2 {
4648
label[args[i]] = args[i+1]
4749
}

0 commit comments

Comments
 (0)