feat(bundle): populate CSV alm-examples from config/samples#221
Draft
aslakknutsen wants to merge 1 commit intonetworking-incubator:mainfrom
Draft
feat(bundle): populate CSV alm-examples from config/samples#221aslakknutsen wants to merge 1 commit intonetworking-incubator:mainfrom
aslakknutsen wants to merge 1 commit intonetworking-incubator:mainfrom
Conversation
Generate metadata.annotations.alm-examples when building the OLM bundle so OpenShift/OLM console samples match the Engine and RuleSet manifests under config/samples. Only waf.k8s.coraza.io documents are included; RuleSet is ordered before Engine. JSON is indented and written as a YAML literal block for readable diffs. Add --samples-dir to override the sample path. Fixes: networking-incubator#220 Made-with: Cursor Signed-off-by: Aslak Knutsen <aslak@4fs.no>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the OLM bundle generator to derive the CSV metadata.annotations.alm-examples from the repository’s shipped sample CRs, keeping the OpenShift/OLM console examples aligned with config/samples.
Changes:
- Load multi-document YAML from
config/samples/*.yaml, filtering to owned API group (waf.k8s.coraza.io/*) and sorting RuleSet before Engine. - Serialize examples as indented JSON and emit it as a YAML literal block (
|) for readable diffs. - Add
--samples-dirflag to override the samples directory used foralm-examples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Generate metadata.annotations.alm-examples when building the OLM bundle so OpenShift/OLM console samples match the Engine and RuleSet manifests under config/samples. Only waf.k8s.coraza.io documents are included; RuleSet is ordered before Engine. JSON is indented and written as a YAML literal block for readable diffs. Add --samples-dir to override the sample path.
Fixes: #220
Made-with: Cursor
Describe the pull request
A clear and concise description of what is being introduced
Which issue this resolves
Resolves #_ (if applicable)
Additional context
Add any other context.