Expose CRD projection as a public package

未关闭
#200 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
活跃
技术栈
go
领域
api, devtools

调研方向

Read internal/projection and its callers, especially pubres-toolkit, to see how ProjectCRD is imported and what package paths need updating. Move the package to a public location such as pkg/projection, then run the relevant package and repository tests; done means external modules can import it without adding SDK dependencies or changing its projection behavior.

由索引模型根据 Issue 内容生成。

描述

kind/feature
Feature Description

We generate client tooling (a Terraform provider, later SDKs) from the APIs our services publish through the Sync Agent. To match what users see in kcp, we need the same projection the agent applies: version selection, storage version, renames of versions, group, kind, plural, scope.

This runs offline in CI, from the CRD and PublishedResource files, with no cluster. ProjectCRD does exactly that, but it lives in internal/projection, so it can't be imported from another module. pubres-toolkit uses it, but needs a cluster to read the CRD. Right now we keep a copy of the logic, which has to be kept in sync by hand.

Proposed Solution

Move internal/projection to a public package, for example pkg/projection. It stays in the main module, so there are no new dependencies. Moving it into sdk/ would add k8s.io/apiextensions-apiserver to the SDK, which is probably not wanted.

Alternative Solutions

An offline mode for pubres-toolkit crd that reads the CRD from a file instead of the cluster.

Related: #128.

Want to contribute?
  • I would like to work on this issue.
Additional Context

No response

主要语言
Go
星标
25
派生
35
平均合并
3 天 19 小时
30 天内合并 PR
18

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

kcp-dev/api-syncagent 的其他 Issue

查看 kcp-dev/api-syncagent 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。