Expose CRD projection as a public package

Aberta
#200 2 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
68/100
Tipo de issue
Refatoração
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
go
Domínio
api, devtools

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Go
Estrelas
25
Forks
35
Merge médio
4d 12h
PRs com merge (30d)
16

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de kcp-dev/api-syncagent

Todas as issues de kcp-dev/api-syncagent

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.