chickenlj commented on code in PR #54:
URL: https://github.com/apache/dubbo-kubernetes/pull/54#discussion_r1334055507
##########
app/dubboctl/internal/dubbo/dubbo.go:
##########
@@ -373,42 +372,44 @@ func (f *Dubbo) CheckLabels(ns string, client *Client)
error {
}
if namespace != "" {
- zkSelector := client2.MatchingLabels{
- "dubbo.apache.org/zookeeper": "true",
+ var name string
+ var dns string
+
+ nacosSelector := client2.MatchingLabels{
+ "dubbo.apache.org/nacos": "true",
}
- zkList := &corev1.ServiceList{}
- if err := client.KubeCtl.List(context.Background(), zkList,
zkSelector, client2.InNamespace(namespace)); err != nil {
+ nacosList := &corev1.ServiceList{}
+ if err := client.KubeCtl.List(context.Background(), nacosList,
nacosSelector, client2.InNamespace(namespace)); err != nil {
if errors2.IsNotFound(err) {
return nil
} else {
return err
}
}
- var name string
- var dns string
- if len(zkList.Items) > 0 {
- name = zkList.Items[0].Name
- dns = fmt.Sprintf("%s.%s.svc", name, namespace)
- f.Deploy.ZookeeperAddress = dns
+ if len(nacosList.Items) > 0 {
+ name = nacosList.Items[0].Name
+ dns = fmt.Sprintf("nacos://%s.%s.svc", name, namespace)
+ f.Deploy.Registry = dns
}
- nacosSelector := client2.MatchingLabels{
- "dubbo.apache.org/nacos": "true",
+ zkSelector := client2.MatchingLabels{
+ "dubbo.apache.org/zookeeper": "true",
Review Comment:
Is the Zookeeper service installed with `dubboctl install` now already
labeled with this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]