Expose CRD projection as a public package

Aperta
#200 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api, devtools

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Go
Stelle
25
Fork
35
Merge medio
3g 19h
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di kcp-dev/api-syncagent

Tutte le issue di kcp-dev/api-syncagent

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.