Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds a new dump-initdata command to the kubectl-coco CLI tool that allows users to inspect and debug the generated initdata configuration for Confidential Containers (CoCo). The command can output either human-readable decoded contents (default) or the raw base64-encoded annotation value (with --raw flag).
Changes:
- Added
dump-initdatacommand to display aa.toml, cdh.toml, and policy.rego contents - Implemented decoding logic to extract and display initdata components
- Added comprehensive test coverage for the new command including valid/invalid config handling and raw output mode
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| cmd/dump_initdata.go | Implements the dump-initdata command with functions to generate, decode, and display initdata in both human-readable and raw formats |
| cmd/dump_initdata_test.go | Provides test coverage for the new command including tests for valid configs, raw mode, missing/invalid configs, and the decode helper function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1e4c313 to
a0c5504
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add new cobra command for inspecting generated initdata - Support --config flag for alternate config file path - Support --raw flag for base64-encoded annotation output - Default output shows decoded aa.toml, cdh.toml, policy.rego - Register command in root command tree Assisted-by: AI Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
- TestDumpInitdataWithValidConfig: verifies decoded output with valid config - TestDumpInitdataWithRawFlag: verifies base64-encoded output with --raw - TestDumpInitdataMissingConfig: verifies error handling for missing config - TestDumpInitdataInvalidConfig: verifies error handling for malformed TOML - TestDecodeInitdata: verifies the decode helper function Assisted-by: AI Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
a0c5504 to
0e6edd1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.