You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/10/29 01:39:29 UTC

[GitHub] [dubbo-go-samples] whitekeyboard opened a new issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

whitekeyboard opened a new issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6


   https://github.com/apache/dubbo-go-samples/tree/master/registry/kubernetes
   此例子是基于dubbo-v1.3.0的版本,且为2020年3月16日的版本,当前dubbogo中已经提交了很次代码,建议基于最新dubbo-go提供一个新的镜像范例。当前的例子应该不兼容最新的dubbo-go了,比如DUBBO_NAMESPACE环境变量的注入。
   
   谢谢!


----------------------------------------------------------------
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.

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


[GitHub] [dubbo-go-samples] kms9 commented on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
kms9 commented on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-864804455


   截止到目前 自己使用最新版本的dubbo-go进行编译运行在k8s环境下直接报错
   
   ``` 
   2021-06-21T14:46:11.273+0800	WARN	kubernetes/client.go:178	new kubernetes client: new dubbo-registry controller: init pod informer: read value from env by key (DUBBO_NAMESPACE)) 
   github.com/apache/dubbo-go/remoting/kubernetes.ValidateClient 
   	/root/vendor/github.com/apache/dubbo-go/remoting/kubernetes/client.go:178 
   github.com/apache/dubbo-go/registry/kubernetes.newKubernetesRegistry 
   	/root/vendor/github.com/apache/dubbo-go/registry/kubernetes/registry.go:166 
   github.com/apache/dubbo-go/common/extension.GetRegistry 
   	/root/vendor/github.com/apache/dubbo-go/common/extension/registry.go:39 
   github.com/apache/dubbo-go/registry/protocol.getRegistry 
   	/root/vendor/github.com/apache/dubbo-go/registry/protocol/protocol.go:86 
   github.com/apache/dubbo-go/registry/protocol.(*registryProtocol).Refer 
   	/root/vendor/github.com/apache/dubbo-go/registry/protocol/protocol.go:142 
   github.com/apache/dubbo-go/config.(*ReferenceConfig).Refer 
   	/root/vendor/github.com/apache/dubbo-go/config/reference_config.go:135 
   github.com/apache/dubbo-go/config.loadConsumerConfig 
   	/root/vendor/github.com/apache/dubbo-go/config/config_loader.go:145 
   github.com/apache/dubbo-go/config.Load 
   	/root/vendor/github.com/apache/dubbo-go/config/config_loader.go:354 
   main.main 
   	/root/go-client-pure/cmd/client.go:62 
   runtime.main 
   	/usr/local/go/src/runtime/proc.go:204 
   2021-06-21T14:46:11.273+0800	ERROR	protocol/protocol.go:88	Registry can not connect success, program is going to panic.Error message is new kubernetes client: new dubbo-registry controller: init pod informer: read value from env by key (DUBBO_NAMESPACE) 
   github.com/apache/dubbo-go/registry/protocol.getRegistry 
   	/root/vendor/github.com/apache/dubbo-go/registry/protocol/protocol.go:88 
   github.com/apache/dubbo-go/registry/protocol.(*registryProtocol).Refer 
   	/root/vendor/github.com/apache/dubbo-go/registry/protocol/protocol.go:142 
   github.com/apache/dubbo-go/config.(*ReferenceConfig).Refer 
   	/root/vendor/github.com/apache/dubbo-go/config/reference_config.go:135 
   github.com/apache/dubbo-go/config.loadConsumerConfig 
   	/root/vendor/github.com/apache/dubbo-go/config/config_loader.go:145 
   github.com/apache/dubbo-go/config.Load 
   	/root/vendor/github.com/apache/dubbo-go/config/config_loader.go:354 
   main.main 
   	/root/go-client-pure/cmd/client.go:62 
   runtime.main 
   	/usr/local/go/src/runtime/proc.go:204 
   panic: new kubernetes client: new dubbo-registry controller: init pod informer: read value from env by key (DUBBO_NAMESPACE) 
    
   ```


-- 
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.

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


[GitHub] [dubbo-go-samples] gaoxinge commented on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
gaoxinge commented on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-869086453


   I create a [repository](https://github.com/dubbo-x/k8s-registry) for k8s registry, and master branch denotes the latest (latest denotes v3.0.0-rc2 temporarily). @whitekeyboard @kms9 
   
   @kms9 To solve your error, add a [dubbo namespace environment](https://github.com/dubbo-x/k8s-registry/blob/99337598714b553f655887ef9459995678935200/yaml/client.yaml#L10-L12) in client.yaml. This environment variable ([[1](https://github.com/apache/dubbo-go/blob/cee963fd392eeb8f2daa445f9bfda1b8ee6e67dd/remoting/kubernetes/registry_controller.go)], [[2](https://github.com/apache/dubbo-go/blob/cee963fd392eeb8f2daa445f9bfda1b8ee6e67dd/remoting/kubernetes/registry_controller.go)]) seems to be used for client to watch the namespace where server reside.
   
   


-- 
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


[GitHub] [dubbo-go-samples] kms9 edited a comment on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
kms9 edited a comment on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-876392758


   看了一下 源码 修改一下 账号的配置就可以了. 


-- 
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


[GitHub] [dubbo-go-samples] kms9 commented on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
kms9 commented on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-864804455


   截止到目前 自己使用最新版本的dubbo-go进行编译运行在k8s环境下直接报错
   
   ``` 
   2021-06-21T14:46:11.273+0800	WARN	kubernetes/client.go:178	new kubernetes client: new dubbo-registry controller: init pod informer: read value from env by key (DUBBO_NAMESPACE)) 
   github.com/apache/dubbo-go/remoting/kubernetes.ValidateClient 
   	/root/vendor/github.com/apache/dubbo-go/remoting/kubernetes/client.go:178 
   github.com/apache/dubbo-go/registry/kubernetes.newKubernetesRegistry 
   	/root/vendor/github.com/apache/dubbo-go/registry/kubernetes/registry.go:166 
   github.com/apache/dubbo-go/common/extension.GetRegistry 
   	/root/vendor/github.com/apache/dubbo-go/common/extension/registry.go:39 
   github.com/apache/dubbo-go/registry/protocol.getRegistry 
   	/root/vendor/github.com/apache/dubbo-go/registry/protocol/protocol.go:86 
   github.com/apache/dubbo-go/registry/protocol.(*registryProtocol).Refer 
   	/root/vendor/github.com/apache/dubbo-go/registry/protocol/protocol.go:142 
   github.com/apache/dubbo-go/config.(*ReferenceConfig).Refer 
   	/root/vendor/github.com/apache/dubbo-go/config/reference_config.go:135 
   github.com/apache/dubbo-go/config.loadConsumerConfig 
   	/root/vendor/github.com/apache/dubbo-go/config/config_loader.go:145 
   github.com/apache/dubbo-go/config.Load 
   	/root/vendor/github.com/apache/dubbo-go/config/config_loader.go:354 
   main.main 
   	/root/go-client-pure/cmd/client.go:62 
   runtime.main 
   	/usr/local/go/src/runtime/proc.go:204 
   2021-06-21T14:46:11.273+0800	ERROR	protocol/protocol.go:88	Registry can not connect success, program is going to panic.Error message is new kubernetes client: new dubbo-registry controller: init pod informer: read value from env by key (DUBBO_NAMESPACE) 
   github.com/apache/dubbo-go/registry/protocol.getRegistry 
   	/root/vendor/github.com/apache/dubbo-go/registry/protocol/protocol.go:88 
   github.com/apache/dubbo-go/registry/protocol.(*registryProtocol).Refer 
   	/root/vendor/github.com/apache/dubbo-go/registry/protocol/protocol.go:142 
   github.com/apache/dubbo-go/config.(*ReferenceConfig).Refer 
   	/root/vendor/github.com/apache/dubbo-go/config/reference_config.go:135 
   github.com/apache/dubbo-go/config.loadConsumerConfig 
   	/root/vendor/github.com/apache/dubbo-go/config/config_loader.go:145 
   github.com/apache/dubbo-go/config.Load 
   	/root/vendor/github.com/apache/dubbo-go/config/config_loader.go:354 
   main.main 
   	/root/go-client-pure/cmd/client.go:62 
   runtime.main 
   	/usr/local/go/src/runtime/proc.go:204 
   panic: new kubernetes client: new dubbo-registry controller: init pod informer: read value from env by key (DUBBO_NAMESPACE) 
    
   ```


-- 
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.

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


[GitHub] [dubbo-go-samples] kms9 commented on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
kms9 commented on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-876296527


   @gaoxinge  实验了一下 代码确实可以的. 不过 貌似不支持夸namespace? 不知道是不是我配置的问题.


-- 
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


[GitHub] [dubbo-go-samples] kms9 commented on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
kms9 commented on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-871130767


   @gaoxinge  给到的示例 使用的是  dubbo-go v3里面默认的配置 运行确实没有问题 但是 自己替换 user的暴露的方法时候  遇到了 注册到 k8s `dubbo.io/annotation` 的 还是 `/dubbo/com.ikurento.user.UserProvider/providers` 不会根据配置文件改变.


-- 
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


[GitHub] [dubbo-go-samples] gaoxinge edited a comment on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
gaoxinge edited a comment on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-869086453


   I create a [repository](https://github.com/dubbo-x/k8s-registry) for k8s registry, and master branch denotes the latest (latest denotes v3.0.0-rc2 temporarily). @whitekeyboard @kms9 
   
   @kms9 To solve your error, add a [dubbo namespace environment](https://github.com/dubbo-x/k8s-registry/blob/99337598714b553f655887ef9459995678935200/yaml/client.yaml#L10-L12) in client.yaml. This environment variable ([[1](https://github.com/apache/dubbo-go/blob/cee963fd392eeb8f2daa445f9bfda1b8ee6e67dd/remoting/kubernetes/registry_controller.go#L58)], [[2](https://github.com/apache/dubbo-go/blob/cee963fd392eeb8f2daa445f9bfda1b8ee6e67dd/remoting/kubernetes/registry_controller.go#L239)]) seems to be used for client to watch the namespace where server reside.
   
   


-- 
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


[GitHub] [dubbo-go-samples] gaoxinge commented on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
gaoxinge commented on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-871856362


   @kms9 是把下面两个文件关于user的暴露的方法都改了,但是pod的annotation的key `dubbo.io/annotation`对应的value还是没有变?
   
   - https://github.com/dubbo-x/k8s-registry/blob/a77f69b8cb8c89ac646755bb42f74d720d3d6535/server/cmd/server.go#L63
   - https://github.com/dubbo-x/k8s-registry/blob/a77f69b8cb8c89ac646755bb42f74d720d3d6535/server/conf/server.yml#L29


-- 
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


[GitHub] [dubbo-go-samples] gaoxinge commented on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
gaoxinge commented on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-873343283


   @kms9 你的意思是:虽然改了代码和配置,但是感觉新代码没有生效,pod里面还是跑的老代码?
   
   直接拿你的代码跑了一下,也单独建了一个[分支](https://github.com/dubbo-x/k8s-registry/tree/dubbo-go-samples-issue6-0)(改了一些路径和镜像名,其他保持一致)跑了一下,新代码应该没有问题(client pod能打印出结果):
   
   ![929A8D05-06C5-4c76-98E3-2B6457EE12F0](https://user-images.githubusercontent.com/16648345/124342766-f1cc4300-dbf8-11eb-85dd-bc3d14b55f31.png)
   
   我猜测可能是:client.sh/server.sh中打完镜像,上传镜像,然后k8s去拉镜像(client-k8s.yaml/server-k8s.yaml里面是`imagePullPolicy: Always`,每次都会拉镜像,写的很细节)的时候,会不会远程hub缓存了老的镜像,导致拉取下来的任然是老的镜像。
   
   你要不每次打镜像的时候,都更新一下tag(现在一直是v1.1),然后多试几次看看。


-- 
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


[GitHub] [dubbo-go-samples] AlexStocks commented on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-718358028


   cc @sxllwx 


----------------------------------------------------------------
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.

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


[GitHub] [dubbo-go-samples] kms9 commented on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
kms9 commented on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-872092525


   [k8s-registry.zip](https://github.com/apache/dubbo-go-samples/files/6747146/k8s-registry.zip)
   
   @gaoxinge  基于你给的demo修改后的代码


-- 
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


[GitHub] [dubbo-go-samples] kms9 edited a comment on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
kms9 edited a comment on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-876392758


   看了一下 源码 修改一下 账号的配置就可以了.                              
   ```
   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: dserver
   spec:
     replicas: 2
     selector:
       matchLabels:
         role: dserver
     template:
       metadata:
         labels:
           role: dserver
       spec:
         containers:
           - image: 10.8.8.207:6080/rancher/dserver:v1.1
             name: server
             env:
               - name: DUBBO_NAMESPACE
                 value: "default,tools"
               - name: NAMESPACE
                 valueFrom:
                   fieldRef:
                     fieldPath: metadata.namespace
             imagePullPolicy: Always
         serviceAccountName: dubbo-sa
   ```
   配置一下 监听的这里
   ```
    - name: DUBBO_NAMESPACE
                 value: "default,tools"
   ```


-- 
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


[GitHub] [dubbo-go-samples] kms9 commented on issue #6: kubernetes是否可以基于最新的DUBBO版本提供镜像

Posted by GitBox <gi...@apache.org>.
kms9 commented on issue #6:
URL: https://github.com/apache/dubbo-go-samples/issues/6#issuecomment-876392758


   看了一下 源码 修改一下 账号的配置就可以了. 


-- 
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