You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "chickenlj (via GitHub)" <gi...@apache.org> on 2023/09/22 08:21:35 UTC
[GitHub] [dubbo-kubernetes] chickenlj commented on a diff in pull request #54: fix deploy and build
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org