-
Notifications
You must be signed in to change notification settings - Fork 15
chore/inspektor_gadget: Add upgrade action #142
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
Conversation
This change adds upgrade action to allow users to upgrade Inspektor Gadget. It aligns gadget version with Inspektor Gadget version to ensure compatibility. Also, we setup the grpcruntime at runtime to ensure lastest kubeconfig is used Signed-off-by: Qasim Sarfraz <qasimsarfraz@microsoft.com>
acf206b
to
c3d153f
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #142 +/- ##
=======================================
Coverage ? 34.82%
=======================================
Files ? 53
Lines ? 5309
Branches ? 0
=======================================
Hits ? 1849
Misses ? 3379
Partials ? 81 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 enhances the Inspektor Gadget observability tool by adding upgrade functionality for "Day 2" operations. It introduces an upgrade action that allows users to upgrade their Inspektor Gadget deployment and includes version information in deployment status checks to hint when upgrades are available.
Key changes include:
- Added upgrade action with version checking and Helm upgrade command execution
- Modified gadget image handling to use dynamic versioning based on Inspektor Gadget version
- Refactored runtime initialization to always use latest kubeconfig without requiring server restart
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
internal/server/server.go | Simplified gadget manager initialization by removing error handling |
internal/components/inspektorgadget/registry.go | Added upgrade action to tool description |
internal/components/inspektorgadget/helpers_test.go | Added tests for gadget version mapping function |
internal/components/inspektorgadget/helpers.go | Added version mapping logic and caching for GitHub version retrieval |
internal/components/inspektorgadget/handlers_test.go | Updated mock interface to include GetVersion method |
internal/components/inspektorgadget/handlers.go | Added upgrade action handler and enhanced version checking |
internal/components/inspektorgadget/gadgets_test.go | Added test to ensure gadget images don't contain version tags |
internal/components/inspektorgadget/gadgets.go | Removed hardcoded version tags and added dynamic image method |
internal/components/inspektorgadget/gadgetmanager.go | Refactored runtime handling and added GetVersion method |
internal/components/inspektorgadget/const.go | Added upgrade action constant |
docs/inspektor-gadget-usage.md | Updated documentation to reflect that kubeconfig restart is no longer needed |
Signed-off-by: Qasim Sarfraz <qasimsarfraz@microsoft.com>
ef559d4
to
801d355
Compare
lgtm |
This PR makes changes to handle "Day 2" of
inspektor_gadget_observability
tool. It adds upgrade action to allow users to upgrade Inspektor Gadget. Also, includes this version information in theis_deployed
to hint for an upgrade.Other improvements include aligning gadget version with Inspektor Gadget version to ensure compatibility. Also, runtime now always uses the latest
kubeconfig
to ensure if user doesget-credentials
they don't need to restart the server and introducing lock formatter which we need as part of new IG release.Testing Done
I have included some tests. Also, asked copilot to do some testing.