Expose CRD projection as a public package

Ouverte
#200 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
68/100
Type d'issue
Refactorisation
Clarté
Clairement spécifiée
Activité
Active
Stack technique
go
Domaine
api, devtools

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
Go
Étoiles
25
Forks
35
Merge moyen
3 j 19 h
PR mergées (30 j)
18

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de kcp-dev/api-syncagent

Toutes les issues de kcp-dev/api-syncagent

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.