mfordjody opened a new pull request, #827:
URL: https://github.com/apache/dubbo-go-pixiu/pull/827
The resources come from the samples. First, create controller.yaml.
```
root@master:~/opensource/dubbo-go-pixiu/controllers# k get po -n
pixiu-gateway-system
NAME READY STATUS RESTARTS AGE
pg-controller-5999ccd96c-b6xsj 1/1 Running 0 44s
root@master:~/opensource/dubbo-go-pixiu/controllers# k get svc
-npixiu-gateway-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
AGE
pg-controller ClusterIP 10.99.198.123 <none>
8080/TCP,8081/TCP 50s
```
The pixiugateway.yaml will trigger the Pixiu Gateway controller to
automatically create the Deployment and Service.
```bash
root@master:~/opensource/dubbo-go-pixiu/controllers# cat
samples/pixiugateway.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: pg
spec:
controllerName: pixiu.apache.org/pixiu-gateway-controller
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: pg
namespace: pixiu-gateway-system
spec:
gatewayClassName: pg
listeners:
- name: http
protocol: HTTP
port: 80
root@master:~/opensource/dubbo-go-pixiu/controllers# k create -f
samples/pixiugateway.yaml
gatewayclass.gateway.networking.k8s.io/pg created
gateway.gateway.networking.k8s.io/pg created
```
创建完成后将会有两个pod,一个是 pixiu gateway 和 pixiu gateway controller
```bash
root@master:~/opensource/dubbo-go-pixiu/controllers# k get po -n
pixiu-gateway-system
NAME READY STATUS RESTARTS AGE
pg-16c34be0-6745994458-2ks9f 1/1 Running 0 12s
pg-controller-5999ccd96c-b6xsj 1/1 Running 0 2m4s
root@master:~/opensource/dubbo-go-pixiu/controllers# k get svc
-npixiu-gateway-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
AGE
pg-16c34be0 LoadBalancer 10.105.52.15 <pending> 80:32352/TCP
18s
pg-controller ClusterIP 10.99.198.123 <none>
8080/TCP,8081/TCP 2m10s
root@master:~/opensource/dubbo-go-pixiu/controllers# k get cm pg-config -n
pixiu-gateway-system -oyaml
apiVersion: v1
data:
conf.yaml: |
static_resources:
listeners:
- name: http
protocol_type: HTTP
address:
socket_address:
address: 0.0.0.0
port: 8888
filter_chains:
filters:
- name: dgp.filter.httpconnectionmanager
config:
route_config:
routes:
- match:
prefix: /
route:
cluster: default-backend
cluster_not_found_response_code: 503
http_filters:
- name: dgp.filter.http.httpproxy
config:
idle_timeout: 5s
read_timeout: 5s
write_timeout: 5s
clusters:
- name: default-backend
type: Static
lb_policy: lb
endpoints:
- id: 1
socket_address:
address: 192.168.219.100
port: 3000
shutdown_config:
timeout: 60s
step_timeout: 10s
reject_policy: immediacy
log:
level: info
kind: ConfigMap
metadata:
creationTimestamp: "2025-12-06T21:32:55Z"
labels:
app.kubernetes.io/managed-by: pg-controller
gateway.networking.k8s.io/gateway-name: pg
name: pg-config
namespace: pixiu-gateway-system
ownerReferences:
- apiVersion: gateway.networking.k8s.io/v1
controller: true
kind: Gateway
name: pg
uid: 16c34be0-5e85-46d3-97a6-6f037e2ddbde
resourceVersion: "598454"
uid: c56bd04e-1ef3-415e-8baf-99b8f2215b70
```
To test the newly created gateway, we use the backend test program that
comes with Envoy Proxy. This is done for efficiency, and the underlying
principles remain the same.
```bash
root@master:~/opensource/dubbo-go-pixiu/controllers# export
GATEWAY_HOST=$(kubectl get gateway/pg -n pixiu-gateway-system -o
jsonpath='{.status.addresses[0].value}')
root@master:~/opensource/dubbo-go-pixiu/controllers# k get svc
-npixiu-gateway-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
AGE
pg-16c34be0 LoadBalancer 10.105.52.15 <pending> 80:32352/TCP
2m18s
pg-controller ClusterIP 10.99.198.123 <none>
8080/TCP,8081/TCP 4m10s
root@master:~/opensource/dubbo-go-pixiu/controllers# curl --verbose --header
"Host: www.example.com" http://$GATEWAY_HOST/get
* Trying 10.105.52.15:80...
* Connected to 10.105.52.15 (10.105.52.15) port 80
> GET /get HTTP/1.1
> Host: www.example.com
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 307
< Content-Type: application/json
< Date: Sat, 06 Dec 2025 21:35:17 GMT
< X-Content-Type-Options: nosniff
<
{
"path": "/get",
"host": "192.168.219.100:3000",
"method": "GET",
"proto": "HTTP/1.1",
"headers": {
"Accept": [
"*/*"
],
"Accept-Encoding": [
"gzip"
],
"User-Agent": [
"curl/8.5.0"
]
},
"namespace": "default",
"ingress": "",
"service": "",
"pod": "backend-869c8646c5-6kbx4"
* Connection #0 to host 10.105.52.15 left intact
}
```
Future development will further refine Pixiu’s capabilities and extend
pg-controller with new interfaces as needed. The key driving factor will be the
overall completeness of the project’s functionality—whether related to
artificial intelligence or other areas.
--
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]