feat: Generate the Artifact Hub CRD annotation from extra/crds.yaml - #622
feat: Generate the Artifact Hub CRD annotation from extra/crds.yaml#622lfrancke wants to merge 2 commits into
Conversation
This is derived from extra/crds.yaml and ends up in Chart.yaml.
|
If you like I can create this as a test PR in one repo first. |
Addresses review feedback: the recipe was one long line, so it was not obvious that it reads extra/crds.yaml and writes Chart.yaml. CRD_ANNOTATION_READ and CRD_ANNOTATION_WRITE are now separate, each with its own comment. Still a single shell command: the env-var prefix is needed because the value is multi-line and reaches yq via strenv.
| mkdir -p extra | ||
| cargo run --bin stackable-"${OPERATOR_NAME}" -- crd > extra/crds.yaml | ||
|
|
||
| # This adds CRD metadata for artifacthub.io (AH) to Chart.yaml. |
There was a problem hiding this comment.
I feel like this should be an xtask (or even a subcommand on the operator itself, like the crd subcommand) instead.
Also, this would need to be executed by pre-commit/prek to ensure consistency.
There was a problem hiding this comment.
I want to push back on both.
-
We don't have xtask or anything like that for any other command in here and we already even do rewriting (for version stuff) with yq. So this is consistent
-
This is already executed via prek (regenerate-charts) so that's covered and it triggers when it's inconsistent.
There was a problem hiding this comment.
@Techassi Can we resolve this or do you want to push back on my pushback?
NickLarsenNZ
left a comment
There was a problem hiding this comment.
LGTM.
The yq statements could b easier to read on multiple lines but that can be done later (ie: when it bugs me enough, I'll do it).
This is derived from extra/crds.yaml and ends up in Chart.yaml.