feat: 定义 v1alpha1 API 合同 #2

Merged
panxiao81 merged 2 commits from feature/v1alpha1-api into main 2026-09-10 08:12:44 +00:00
2 changed files with 14 additions and 4 deletions
Showing only changes of commit b443d78d14 - Show all commits
+9 -2
View File
@@ -105,9 +105,15 @@ make generate # Regenerate DeepCopy methods
**After editing `*.go` files:**
```
make lint-fix # Auto-fix code style
make test # Run unit tests
make lint # Local verification; full tests run in PR CI
```
Do not routinely run the full `make test` or Kind E2E suite during local agent
iteration. Keep local feedback fast with generation checks and `make lint`; after the
human approves opening the PR, rely on the configured self-hosted Gitea Actions jobs for
the complete test suite. Run a focused local test only when it is needed to diagnose a
specific failure or the user explicitly requests it.
## CLI Commands Cheat Sheet
### Create API (your own types)
@@ -182,7 +188,8 @@ kubebuilder create webhook \
## Testing & Development
```bash
make test # Run unit tests (uses envtest: real K8s API + etcd)
make lint # Default local verification
make test # Full unit/envtest suite; normally run by PR CI
make run # Run locally (uses current kubeconfig context)
```
+5 -2
View File
@@ -43,11 +43,14 @@ kubeconfig 或本地生成的二进制。
5. 提交前运行:
```sh
make test
make lint
git diff --exit-code
git diff --check
```
Agent 日常本地迭代不运行耗时的完整 `make test` 或 Kind E2E;生成一致性、Tests 和 E2E
由获准创建 PR 后的 self-hosted Gitea Actions 执行。只有排查特定失败或人工明确要求时
才运行针对性的本地测试。
6. 达到一个小而完整、可独立 review 的边界时,先请求批准再创建 commit;一个 PR
可以包含多个这样的 commit。
7. 推送分支后,在创建 PR 前再次请求批准。PR 说明应包含规格链接、动机、行为变化、