Conversation
There was a problem hiding this comment.
Pull request overview
This pull request introduces significant improvements to the cluster-bootstrap CLI tool, focusing on enhanced observability, validation, and idempotent operations. The changes add three new diagnostic commands (doctor, status, validate), implement comprehensive bootstrap reporting with multiple output formats, and refactor resource management functions to explicitly track whether resources are created or updated.
Changes:
- Added three new CLI commands:
doctor(tooling checks),status(cluster status alias for info), andvalidate(comprehensive validation of config, secrets, and cluster) - Implemented bootstrap reporting system with JSON and summary output formats, tracking stage timing, resource operations, and health checks
- Refactored k8s and helm functions to return boolean flags indicating create vs. update operations for true idempotency
- Changed k8s Client to use kubernetes.Interface instead of concrete type for better testability
- Enhanced info command to display ArgoCD Applications with sync/health status
- Updated documentation with detailed information about new commands, idempotent behavior, and reporting features
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| mkdocs.yml | Added navigation entries for new CLI commands and fixed indentation formatting |
| docs/cli/validate.md | Documentation for new validate command with flags and examples |
| docs/cli/status.md | Documentation for new status command (alias of info) |
| docs/cli/doctor.md | Documentation for new doctor command for prerequisite checks |
| docs/cli/index.md | Updated CLI overview with new commands |
| docs/cli/bootstrap.md | Added documentation for idempotent behavior and bootstrap reporting feature |
| README.md | Updated with idempotent design note, bootstrap reports section, and new commands in CLI table |
| cli/internal/k8s/secrets_test.go | New comprehensive tests for idempotent secret operations |
| cli/internal/k8s/secrets.go | Modified CreateRepoSSHSecret and CreateGitCryptKeySecret to return boolean indicating create vs update |
| cli/internal/k8s/client.go | Changed Clientset from concrete type to kubernetes.Interface for better testability |
| cli/internal/k8s/appofapps.go | Modified ApplyAppOfApps to return boolean indicating create vs update |
| cli/internal/helm/argocd.go | Modified InstallArgoCD to return boolean indicating install vs upgrade |
| cli/cmd/validate.go | New comprehensive validation command (490 lines) checking config, secrets, cluster, repo access |
| cli/cmd/status.go | New status command as alias for info command |
| cli/cmd/preflight.go | Added CheckKubectlClusterAccessWithConfig to support custom kubeconfig/context |
| cli/cmd/info.go | Enhanced to discover and display ArgoCD Applications with sync/health status; fixed prometheus selector |
| cli/cmd/gitcrypt_key.go | Updated to show "Created" vs "Updated" based on returned boolean |
| cli/cmd/doctor.go | New diagnostic command for checking local tools and cluster access |
| cli/cmd/bootstrap_report_test.go | Comprehensive tests for bootstrap reporting functionality |
| cli/cmd/bootstrap_report.go | New bootstrap reporting system with stage timing, resource tracking, and health status |
| cli/cmd/bootstrap.go | Integrated reporting system, tracking all stages and resource operations with create/update status |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ootstrap into feature/new-commands
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 28 out of 28 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ootstrap into feature/new-commands
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 28 out of 28 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ootstrap into feature/new-commands
Uh oh!
There was an error while loading. Please reload this page.