mfordjody opened a new issue, #891:
URL: https://github.com/apache/dubbo-go-pixiu/issues/891

   在 v1.1.0 版本的 gateway 和 pixiu proxy 可以从 hello world 示例里面创建 http 服务,从而访问到正常数据。
   ```
   root@master:# kubectl get po,svc
   NAME                                  READY   STATUS    RESTARTS   AGE
   pod/pixiu-155144e0-6d49bd87b7-4xt24   1/1     Running   0          106s
   pod/pixiu-gateway-5db9cf587d-w8vdf    1/1     Running   0          2m37s
   ```
   
   ```
   NAME                     TYPE           CLUSTER-IP       EXTERNAL-IP   
PORT(S)             AGE
   service/kubernetes       ClusterIP      10.96.0.1        <none>        
443/TCP             6d5h
   service/pixiu-155144e0   LoadBalancer   10.106.128.228   <pending>     
80:31997/TCP        106s
   service/pixiu-gateway    ClusterIP      10.100.174.118   <none>        
8080/TCP,8081/TCP   2m37s
   ```
   
   ```
   root@master:# k create -f http/
   httproute.gateway.networking.k8s.io/helloworld-http-route created
   pixiuclusterpolicy.pixiu.apache.org/helloworld-cluster created
   pixiufilterpolicy.pixiu.apache.org/helloworld-http-filter created
   ```
   
   ```
   root@master:# curl -v --header "Content-Type: application/json" --data 
'{"name": "Hello World"}' http://$NODE_IP:31997/greet.GreetService/Greet
   *   Trying 192.168.15.164:31997...
   * Connected to 192.168.15.164 (192.168.15.164) port 31997
   > POST /greet.GreetService/Greet HTTP/1.1
   > Host: 192.168.15.164:31997
   > User-Agent: curl/8.5.0
   > Accept: */*
   > Content-Type: application/json
   > Content-Length: 23
   >
   < HTTP/1.1 200 OK
   < Content-Type: application/grpc
   < Date: Wed, 11 Mar 2026 11:19:41 GMT
   < Grpc-Accept-Encoding: gzip
   < Content-Length: 26
   <
   * Connection #0 to host 192.168.15.164 left intact
   ```
   
   ```
   root@master:# kubectl get po
   NAME                              READY   STATUS    RESTARTS   AGE
   pixiu-155144e0-6fc4d865df-cj62t   1/1     Running   0          7s
   pixiu-gateway-5db9cf587d-w8vdf    1/1     Running   0          2m49s
   ```
   
   在 v1.2.0 版本对 gateway 进行优化改进,对 pixiu pod 进行支持内置热加载方式去完成,不再重启。
   ```
   ```
   root@master:# kubectl get po
   NAME                             READY   STATUS              RESTARTS   AGE
   pixiu-gateway-5c854cfdd9-j6lht   0/1     ContainerCreating   0          2s
   ```
   root@master:# kubectl get po
   NAME                              READY   STATUS              RESTARTS   AGE
   pixiu-2b6e10bb-7f8585ffd6-dh977   0/1     ContainerCreating   0          1s
   pixiu-gateway-5c854cfdd9-j6lht    1/1     Running             0          38s
   ```
   ```
   root@master:# kubectl get po
   NAME                              READY   STATUS    RESTARTS   AGE
   pixiu-2b6e10bb-7f8585ffd6-dh977   1/1     Running   0          1s
   pixiu-gateway-5c854cfdd9-j6lht    1/1     Running   0          38s
   ```
   ```
   root@master:# kubectl get po,svc
   NAME                                  READY   STATUS    RESTARTS   AGE
   pod/pixiu-2b6e10bb-7f8585ffd6-dh977   1/1     Running   0          4s
   pod/pixiu-gateway-5c854cfdd9-j6lht    1/1     Running   0          41s
   ```
   ```
   NAME                     TYPE           CLUSTER-IP      EXTERNAL-IP   
PORT(S)             AGE
   service/kubernetes       ClusterIP      10.96.0.1       <none>        
443/TCP             5d13h
   service/pixiu-2b6e10bb   LoadBalancer   10.106.195.1    <pending>     
80:30177/TCP        4s
   service/pixiu-gateway    ClusterIP      10.98.195.228   <none>        
8080/TCP,8081/TCP   41s
   ```
   ```
   root@master:# curl -v --header "Content-Type: application/json" --data 
'{"name": "Hello World"}' http://$NODE_IP:30177/greet.GreetService/Greet
   *   Trying 192.168.15.164:30177...
   * Connected to 192.168.15.164 (192.168.15.164) port 30177
   > POST /greet.GreetService/Greet HTTP/1.1
   > Host: 192.168.15.164:30177
   > User-Agent: curl/8.5.0
   > Accept: */*
   > Content-Type: application/json
   > Content-Length: 23
   >
   < HTTP/1.1 404 Not Found
   < Content-Type: application/json
   < Date: Tue, 10 Mar 2026 18:49:40 GMT
   < Content-Length: 42
   <
   * Connection #0 to host 192.168.15.164 left intact
   {"status":404,"message":"Route not 
found"}root@master:~/opensource/dubbo-go-pixiu-samples/gateway#
   ```
   ```
   root@master:~/opensource/dubbo-go-pixiu-samples/gateway# k create -f http/
   httproute.gateway.networking.k8s.io/helloworld-http-route created
   pixiuclusterpolicy.pixiu.apache.org/helloworld-cluster created
   pixiufilterpolicy.pixiu.apache.org/helloworld-http-filter created
   ```
   ```
   root@master:# curl -v --header "Content-Type: application/json" --data 
'{"name": "Hello World"}' http://$NODE_IP:30177/greet.GreetService/Greet
   *   Trying 192.168.15.164:30177...
   * Connected to 192.168.15.164 (192.168.15.164) port 30177
   > POST /greet.GreetService/Greet HTTP/1.1
   > Host: 192.168.15.164:30177
   > User-Agent: curl/8.5.0
   > Accept: */*
   > Content-Type: application/json
   > Content-Length: 23
   >
   < HTTP/1.1 200 OK
   < Content-Type: application/grpc
   < Date: Tue, 10 Mar 2026 18:49:47 GMT
   < Grpc-Accept-Encoding: gzip
   < Content-Length: 26
   <
   * Connection #0 to host 192.168.15.164 left intact
   {"greeting":"Hello World"}root@master:# kubectl get po
   NAME                              READY   STATUS    RESTARTS   AGE
   pixiu-2b6e10bb-7f8585ffd6-dh977   1/1     Running   0          38s
   pixiu-gateway-5c854cfdd9-j6lht    1/1     Running   0          75s
   ```
   
   进入 pixiu-gateway 的日志里面去查看热加载相关的
   
   新的服务的创建(http.yaml)会被 pixiu-gateway 生成新的 configmap,主要需要更新 
routes、clusters、endpoints 然后触发热加载 POST http://podip:18380/-/reload
   
   热加载处理先更新触发日志更新,然后是 RouteReloader 路由配置,最后是 ClusterReloader 去更新 ClusterManager 
完成添加或更新 cluster
   和更新 endpoints;所以请求到达需要满足:1. 路由匹配;2. clustermanager 找到 cluster;3. 找到 endpoint 
即可返回 200
   ```
   2026-03-10T18:49:44.454Z     INFO    controllers.Gateway     
controller/gateway_controller.go:1339   triggering hot reload   {"pod": 
"pixiu-2b6e10bb-7f8585ffd6-dh977", "url": 
"http://192.168.219.100:18380/-/reload"}
   2026-03-10T18:49:44.459Z     INFO    controllers.Gateway     
controller/gateway_controller.go:1360   hot reload successful   {"pod": 
"pixiu-2b6e10bb-7f8585ffd6-dh977"}
   2026-03-10T18:49:44.459Z     INFO    controllers.Gateway     
controller/gateway_controller.go:1372   hot reload completed    {"gateway": 
"pixiu", "successCount": 1, "totalPods": 1}
   2026-03-10T18:49:44.459Z     INFO    controllers.Gateway     
controller/gateway_controller.go:691    hot reload triggered successfully after 
configmap update        {"gateway": "pixiu"}
   2026-03-10T18:49:44.459Z     INFO    controllers.Gateway     
controller/gateway_controller.go:809    config hash changed, triggering hot 
reload      {"gateway": "pixiu", "deployment": "pixiu-2b6e10bb", "oldHash": 
"54006de8764abb2746a449af248838547309d32838ec1d03574c8511250bad84", "newHash": 
"6e779622acf501a9407953a1ea3efd420260556191087802f064b1e8a8b6ca64"}
   2026-03-10T18:49:44.459Z     INFO    controllers.Gateway     
controller/gateway_controller.go:1339   triggering hot reload   {"pod": 
"pixiu-2b6e10bb-7f8585ffd6-dh977", "url": 
"http://192.168.219.100:18380/-/reload"}
   2026-03-10T18:49:44.460Z     INFO    controllers.Gateway     
controller/gateway_controller.go:1360   hot reload successful   {"pod": 
"pixiu-2b6e10bb-7f8585ffd6-dh977"}
   2026-03-10T18:49:44.460Z     INFO    controllers.Gateway     
controller/gateway_controller.go:1372   hot reload completed    {"gateway": 
"pixiu", "successCount": 1, "totalPods": 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: [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]

Reply via email to