replace crd-puller with pubres-toolkit #76
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The old crd-puller existed because our discovery works based on GK, not like kcp's crd-puller, which works based on GR. However just dumping a CRD is not super helpful by itself and since the agent can now export multiple versions in a CRD, the difference between ours and kcp's pullers is diminishing.
So I propose we replace the puller with a more generic toolkit that offers tailormade commands for the agent. In the current iteration it supports one single command:
crd.So what was
crd-puller Certificate.cert-manager.iois nowpubres-toolkit crd mypubres.yaml, with a PublishedResource YAML file being the source. The main advantage here is that we do not just pull the CRD, but also project it (i.e. optionally change its Kind and whatnot). To simulate how exactly a PubRes works is kinda neat to have.The command has two flags:
--arsoutputs an APIResourceSchema instead--no-projectiondisables the projection rules (turning it into the old crd-puller, basically)I would also like to see a
synccommand, which will perform a simulated sync, outputting what resources it sees and which it will create on the local service cluster side.What Type of PR Is This?
/kind feature
Release Notes