Prepare oadp-cli for krew addition - #20
Merged
Merged
Conversation
- Add Krew plugin manifest (oadp.yaml) with LICENSE extraction - Update Makefile with release targets and krew-manifest generation - Fix .gitignore and clean patterns to preserve design documents - Add Krew installation instructions to README - Include LICENSE file in all release archives - Add comprehensive release process documentation Ready for Krew plugin distribution with proper licensing.
Update apiVersion from krew.googlecode.com/v1alpha2 to krew.googlecontainertools.github.com/v1alpha2 for compatibility with current Krew installation. Tested locally with: ✅ Local installation with --manifest and --archive flags ✅ Plugin functionality verification ✅ LICENSE file extraction confirmation ✅ Cross-platform installation testing (linux/amd64 on darwin/arm64) ✅ Plugin uninstallation testing Ready for Krew index submission.
🔧 Makefile Optimizations: - Centralized platform definitions (PLATFORMS variable) to eliminate duplication - Removed hardcoded platform arrays from 3 different targets - Simplified krew-manifest generation with Python script approach - Added fallback sed approach for environments without Python3 - Consolidated binary naming logic for Windows .exe handling 🗂️ File Structure Cleanup: - Removed duplicate design.md template file - Kept kubectl-oadp-design.md as the actual project design document 📊 Impact: - Reduced Makefile from 188 to 165 lines (-12% size reduction) - Eliminated 3 instances of hardcoded platform arrays - Replaced 25 lines of repetitive sed commands with 8 lines of Python - Improved maintainability and reduced error-prone manual updates ✅ Verified: - All build targets work correctly - Platform binary generation successful (5 platforms) - Help system and documentation updated - No functionality regressions
kaovilai
reviewed
Jul 15, 2025
kaovilai
reviewed
Jul 15, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR prepares the OADP CLI for distribution via Krew by adding license headers, creating a Krew plugin manifest, and enhancing build/release scripts and documentation.
- Added Apache 2.0 license headers to source and test files
- Introduced
oadp.yaml(Krew plugin manifest) and updated CLI examples for plugin usage - Enhanced Makefile with versioning, multi-platform release targets, and
krew-manifestgeneration
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/common.go | Added Apache 2.0 license header |
| oadp.yaml | New Krew plugin manifest with plugin metadata |
| main.go | Imported K8s auth plugins and added license header |
| cmd/root.go | Added plugin invocation detection and dynamic usage prefix logic |
| README.md | Added Krew installation instructions and release process notes |
| Makefile | Centralized platform targets, versioning, release and manifest rules |
Comments suppressed due to low confidence (3)
oadp.yaml:36
- Each
sha256field must be populated with the actual checksum of the corresponding archive. Leaving them empty will break Krew plugin verification.
sha256: ""
README.md:34
- [nitpick] The step to install Krew via
kubectl krew install krewmay be confusing or incorrect; link to the official Krew installation instructions instead of using itself.
kubectl krew install krew
Makefile:20
- [nitpick] The
get_binary_namehelper is defined but never used; consider removing it or integrating it into your release scripts to avoid dead code.
define get_binary_name
kaovilai
approved these changes
Jul 16, 2025
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.
No description provided.