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.