mochengqian opened a new issue, #146:
URL: https://github.com/apache/dubbo-go-pixiu-samples/issues/146

   **问题描述**:
   
   在 `gateway` 样例中,`gateway/helloworld/deployment.yaml` 仍然使用浮动镜像 
`dubbogopixiu/helloworld-go-server:master`,这会让样例结果依赖远端 tag 漂移,用户复现和 CI 都不稳定。
   
   同时,`gateway/k8s/pixiu-gateway.yaml` 与 
`gateway/http/http.yaml`、`gateway/helloworld/deployment.yaml` 之间存在结构性闭合风险,涉及:
   
   1. `Gateway API / Pixiu CRD` 相关 fixture 是否完整可校验。
   2. `Gateway listener protocol` 是否符合样例实际路由语义。
   3. `ReferenceGrant` 是否存在并覆盖跨 namespace backend 引用。
   4. `HTTPRoute parentRef` 是否真的指向有效 `Gateway` / `listener`。
   5. `Service port` 是否与 `HTTPRoute backendRef`、Pixiu cluster endpoint 一致。
   6. `PixiuClusterPolicy endpoint`、`PixiuFilterPolicy cluster` 引用是否闭合。
   
   这些是样例整体的 Kubernetes 结构可信度问题。如果不做前置静态校验,就只能把错误留到 kind / E2E 阶段才暴露,成本高且不利于维护。
   
   **预期行为**:
   
   - `gateway` 样例不应依赖 `:master` / `:latest` 这类浮动镜像。
   - `gateway` 的 manifest / CRD / policy / route / service / reference 
关系应当能在静态层先验证闭合。
   - `gateway-static` 应能在不跑 kind 的情况下挡住明显 YAML 漂移。
   - `gateway-e2e` 仍保留真实 kind 路径,但不应承担本可静态发现的问题。
   
   **复现步骤**:
   
   ```bash
   cd dubbo-go-pixiu-samples
   
   # 1. 检查浮动镜像
   grep -n 'helloworld-go-server' gateway/helloworld/deployment.yaml
   
   # 2. 检查样例 manifest 关系
   go run ./tools/sampletester -sample gateway-static
   ```
   
   如需验证真实 kind 路径:
   
   ```bash
   go run ./tools/sampletester -sample gateway-e2e -bootstrap-kind -timeout 20m
   ```
   
   **环境信息**:
   
   - dubbo-go-pixiu-samples:当前基线 `HEAD`
   - Go:1.25.0
   - 操作系统:macOS
   - 复现方式:静态检查 + sampletester
   
   **关键日志**:
   
   ```text
   gateway/helloworld/deployment.yaml:62:
     image: dubbogopixiu/helloworld-go-server:master
   
   gateway-static validation failed:
   - ... Deployment ... image ... is not pinned: floating tag master
   ```
   
   `gateway-static` 路径已经能把这类问题提前挡住,说明这组问题本质上是一条配置可信度链路,不是单独某个字段的小毛病。
   
   **初步分析**:
   
    Gateway E2E 使用 master 镜像:
   master 浮动,今天能跑不代表明天还能复现,样例和 nightly 都会漂。
    gateway CRD / manifest 闭合性:
   这类是 Kubernetes 真实校验会失败的结构性问题。这是“配置本身不成立”。
    gateway/static 校验:
   这个像质量门禁,从长期维护看,很值得修,否则以后还会反复漂。


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