Copilot commented on code in PR #149:
URL: 
https://github.com/apache/dubbo-go-pixiu-samples/pull/149#discussion_r3294351270


##########
gateway/README.md:
##########
@@ -0,0 +1,97 @@
+# Gateway Sample
+
+[中文](./README_CN.md)
+
+This sample demonstrates how to use Apache Dubbo-go-pixiu with Kubernetes
+Gateway API resources. It deploys a Pixiu Gateway data plane and routes HTTP
+requests to a Dubbo Triple helloworld backend.
+
+The example includes:
+
+- A Pixiu Gateway controller, `GatewayClass`, and `Gateway`.
+- A helloworld backend `Service` and `Deployment`.
+- An `HTTPRoute` that forwards requests to the backend service.
+- A `ReferenceGrant` that allows the cross-namespace backend reference.
+- Pixiu `PixiuClusterPolicy` and `PixiuFilterPolicy` resources for the gateway.
+
+## Prerequisites
+
+Before running this sample, ensure that you have:
+
+- A running Kubernetes cluster, such as minikube.
+- `kubectl` configured to access the cluster.
+- Gateway API CRDs v1.5.0 or later. This sample uses
+  `gateway.networking.k8s.io/v1` `ReferenceGrant`.
+- Pixiu CRDs for `PixiuClusterPolicy` and `PixiuFilterPolicy`.
+
+Install the required CRDs from the project root:
+
+```sh
+kubectl apply --server-side -f 
https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.5.0/standard-install.yaml
+kubectl apply -k 
'https://github.com/apache/dubbo-go-pixiu/controllers/config/crd?ref=develop'

Review Comment:
   The README installs Pixiu CRDs from `ref=develop`, which is a moving branch 
and can drift over time. Since this doc is explicitly addressing 
reproducibility, consider pinning this URL to a release tag or commit SHA so 
users get a stable, repeatable set of CRDs.
   



##########
gateway/http/http.yaml:
##########
@@ -39,6 +39,21 @@ spec:
           port: 20000
           weight: 100
 ---
+apiVersion: gateway.networking.k8s.io/v1
+kind: ReferenceGrant
+metadata:
+  name: allow-default-httproute-to-dubbo-go-server
+  namespace: helloworld

Review Comment:
   PR description says the helloworld backend image was pinned to a fixed 
digest, but the deployment manifest still uses the floating 
`dubbogopixiu/helloworld-go-server:master` tag. This means the reproducibility 
issue is not actually fixed; please update `gateway/helloworld/deployment.yaml` 
in this PR to use an immutable digest (or at least a versioned tag) as 
described.



##########
gateway/README_CN.md:
##########
@@ -0,0 +1,91 @@
+# Gateway 示例
+
+[English](./README.md)
+
+本示例演示了如何在 Kubernetes Gateway API 资源下使用 Apache Dubbo-go-pixiu。示例会部署 Pixiu 
Gateway 数据面,并将 HTTP 请求路由到 Dubbo Triple helloworld 后端服务。
+
+示例包括:
+
+- Pixiu Gateway 控制器、`GatewayClass` 和 `Gateway`。
+- helloworld 后端 `Service` 和 `Deployment`。
+- 将请求转发到后端服务的 `HTTPRoute`。
+- 允许跨 namespace backend 引用的 `ReferenceGrant`。
+- 作用于网关的 Pixiu `PixiuClusterPolicy` 和 `PixiuFilterPolicy` 资源。
+
+## 前置条件
+
+运行本示例前,请确保已经准备好:
+
+- 一个可用的 Kubernetes 集群,例如 minikube。
+- 已配置好访问该集群的 `kubectl`。
+- Gateway API CRD v1.5.0 或更高版本。本示例使用
+  `gateway.networking.k8s.io/v1` 的 `ReferenceGrant`。
+- Pixiu 的 `PixiuClusterPolicy` 和 `PixiuFilterPolicy` CRD。
+
+在项目根目录下安装所需 CRD:
+
+```sh
+kubectl apply --server-side -f 
https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.5.0/standard-install.yaml
+kubectl apply -k 
'https://github.com/apache/dubbo-go-pixiu/controllers/config/crd?ref=develop'

Review Comment:
   该 README 使用 `ref=develop` 从远端安装 Pixiu CRD,`develop` 
是浮动分支会随时间漂移。既然本文强调样例可复现性,建议将该 URL 固定到 release tag 或 commit SHA,避免用户在不同时间安装到不一致的 
CRD 版本。
   



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