feat(gitops): 添加 http-echo canary
lint / yaml (push) Successful in 17s
lint / terraform (push) Successful in 55s
lint / yaml (pull_request) Successful in 37s
lint / terraform (pull_request) Successful in 42s
lint / ansible (push) Successful in 3m18s
lint / ansible (pull_request) Successful in 3m57s

This commit is contained in:
2026-09-09 19:56:17 +00:00
parent ee75afe2d2
commit 5d0441144d
7 changed files with 51 additions and 17 deletions
+18 -16
View File
@@ -1,22 +1,24 @@
# HTTP Echo (Gateway API workload)
# HTTP Echo(Flux GitOps canary)
**Purpose**
- Preserve a tiny HTTP echo `Deployment + Service` as a future GitOps canary.
- The current `HTTPRoute` still references the retired `contour-gateway`; do not
apply this folder until it is migrated and reviewed against Envoy Gateway.
这是 Flux 首个低风险工作负载,用于验证 PR 合并后的自动部署、健康检查和漂移修复。
Flux 将它部署到独立的 `gitops-canary` namespace。
**Resources**
| File | Description |
| 文件 | 说明 |
| --- | --- |
| `deployment.yaml` | Two replicas of `hashicorp/http-echo` returning `hello from contour gateway`. |
| `service.yaml` | ClusterIP service on port 80 targeted by the route. |
| `httproute.yaml` | Gateway API `HTTPRoute` that targets `contour-gateway` and the `http-echo` service. |
| `deployment.yaml` | 两个 `hashicorp/http-echo` 副本。 |
| `service.yaml` | 只在集群内可达的 ClusterIP Service。 |
| `kustomization.yaml` | Flux 实际构建入口,只包含 Deployment 和 Service。 |
| `httproute.yaml` | 保留的历史 Contour 示例,**不在 Kustomization 中,不会部署**。 |
**How to verify**
## 验证
Migration and verification are intentionally deferred. Update `parentRefs` to the
reviewed Envoy Gateway and choose a hostname covered by its listener before apply.
合并 canary PR 后不手动 apply。等待 Flux 自动创建资源:
**Notes**
- This README records the old test intent; the retired Contour manifests are
available only in legacy Git history.
```bash
sudo k3s kubectl -n flux-system get kustomization http-echo
sudo k3s kubectl -n gitops-canary get deployment,service,pod
```
初始 `prune: false`。验证自动部署后,可以手动把 Deployment replicas 改成 1,
确认 Flux 恢复为 Git 中的 2。删除行为应使用单独的无业务 ConfigMap 和 PR 测试,
验证完成前不得为此路径启用 prune。