-
Notifications
You must be signed in to change notification settings - Fork 972
feat: Implement CRD version validation at server startup, providing warnings and update instructions for outdated CRDs #3355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…arnings and update instructions for outdated CRDs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements CRD (Custom Resource Definition) version validation at server startup to detect outdated or missing CRDs and provide actionable warnings with update instructions. The feature helps prevent runtime issues by validating that required Higress CRDs are installed with the correct versions and schemas before the server starts.
Changes:
- Added CRD version validation logic that checks for required CRDs, their versions, and schema fields
- Integrated validation into server startup with formatted warning messages and update instructions
- Added comprehensive unit tests for validation helper functions
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| pkg/kube/crd_version.go | Implements core CRD validation logic including version checking and schema field validation |
| pkg/kube/crd_version_test.go | Provides unit tests for validation helper functions and CRD definition verification |
| pkg/bootstrap/server.go | Integrates CRD validation into server startup sequence with user-friendly warning output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…factor CRD version helper tests.
…gress into feat/crd_version_check
Ⅰ. Describe what this PR did
Implement CRD version validation at server startup, providing warnings and update instructions for outdated CRDs
fixes: #2278
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
Ⅵ. AI Coding Tool Usage Checklist (if applicable)
Please check all applicable items:
For new standalone features (e.g., new wasm plugin or golang-filter plugin):
design/directory in the plugin folderdesign/directoryFor regular updates/changes (not new plugins):
AI Coding Prompts (for regular updates)
AI Coding Summary