kyverno: add CRDGuard Storybook stories#837
Open
Suhani95 wants to merge 1 commit into
Open
Conversation
Author
illume
requested changes
Jun 19, 2026
illume
left a comment
Contributor
There was a problem hiding this comment.
Thanks!
Looks good. I see there's formatting issue in CI though. (Also check tsc, lint and tests still pass)
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Storybook story file intended to cover the Kyverno CRDGuard CRD-availability states (available, loading, missing per CRD group, and custom message).
Changes:
- Added
CRDGuard.stories.tsxwith stories for loading, available, missing-CRD states, and custom message override. - Included coverage for each supported Kyverno CRD group by parameterizing
requires.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5a8f6c8 to
08633e7
Compare
Signed-off-by: Suhani <suhani4630@gmail.com>
08633e7 to
bc5d534
Compare
Author
|
@illume PTAL |
illume
requested changes
Jun 24, 2026
illume
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the contribution.
Could you take a look at the commit messages in this PR? We follow a Linux kernel style for git commits — see the contributing guide and git log for examples.
Commits that need attention
kyverno: add CRDGuard Storybook stories— Description must start with a capital letter — e.g.frontend: HomeButton: Fix the buttonnotfrontend: HomeButton: fix the button.
Commit guidelines
- Use atomic commits focused on a single change.
- Use the title format
<area>: <Description of changes>— description must start with a capital letter. - Keep the title under 72 characters (soft requirement).
- Explain the intention and why the change is needed.
- Make commit titles meaningful and describe what changed.
- Do not add code that a later commit rewrites; squash or reorder commits instead.
- Do not include
Fixes #NNin commit messages.
Good examples:
frontend: HomeButton: Fix so it navigates to homebackend: config: Add enable-dynamic-clusters flag
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.
Summary
Adds Storybook coverage for the Kyverno
CRDGuardcomponent.This PR introduces stories covering the different CRD availability states handled by
CRDGuard, including successful rendering, loading, missing CRDs, and custom message overrides. A smallPureCRDGuardwrapper is used within the story file to make the component states deterministic without requiring a live cluster or hook mocking.Related Issue
Fixes #834
Changes
src/components/CRDGuard.stories.tsxSteps to Test
npm run lintnpm run storybook-buildCRDGuardstories in StorybookNotes for the Reviewer
CRDGuard.CRDGuardslightly by extractingPureCRDGuard, so stories can reuse the same rendering logic while passing deterministic CRD status.CRDGuard; it still reads CRD status throughuseKyvernoCRDs().