From 56aa4d344d46fa6d5ae170f1856e8c4142d23c31 Mon Sep 17 00:00:00 2001 From: acekingke Date: Sat, 2 Apr 2022 14:54:06 +0800 Subject: [PATCH] mysqlcluser: headless svc has other cluster pods #433 --- mysqlcluster/syncer/headless_service.go | 1 + 1 file changed, 1 insertion(+) diff --git a/mysqlcluster/syncer/headless_service.go b/mysqlcluster/syncer/headless_service.go index cad67409..6b492552 100644 --- a/mysqlcluster/syncer/headless_service.go +++ b/mysqlcluster/syncer/headless_service.go @@ -51,6 +51,7 @@ func NewHeadlessSVCSyncer(cli client.Client, c *mysqlcluster.MysqlCluster) synce service.Spec.Selector = labels.Set{ "app.kubernetes.io/name": "mysql", "app.kubernetes.io/managed-by": "mysql.radondb.com", + "app.kubernetes.io/instance": c.Name, } // Use `publishNotReadyAddresses` to be able to access pods even if the pod is not ready.