feat: add Kubernetes context selection to beacon:deploy#55
Merged
ibourgeois merged 2 commits intomainfrom Apr 9, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a first-class beacon:deploy Artisan command that discovers Kubernetes contexts, prompts for a target (and namespace), and then runs Helm—replacing the previous fixed Helm command embedded in Composer scripts.
Changes:
- Introduce a deploy layer (
KubernetesContextRepository,KubernetesContexts,HelmReleaseDeployer) to discover contexts and execute Helm. - Add
DevOption\Beacon\Commands\DeployCommandand register it in the service provider. - Update Beacon-managed Composer scripts and documentation to call
@php artisan beacon:deploy, with accompanying tests.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/Composer/ComposerScriptsUpdaterTest.php | Updates expectations to assert the new deploy script value. |
| tests/Feature/InstallCommandTest.php | Updates install flow assertions to match the new deploy script. |
| tests/Feature/DeployCommandTest.php | Adds feature coverage for interactive/non-interactive deploy flows and discovery failures. |
| src/Deploy/KubernetesContexts.php | Adds a small value object for available/current contexts and prompt options. |
| src/Deploy/KubernetesContextRepository.php | Implements kubectl-based context discovery with clear failure messages. |
| src/Deploy/HelmReleaseDeployer.php | Encapsulates the Helm upgrade/install execution behind a single method. |
| src/Composer/ComposerScriptsUpdater.php | Switches managed beacon:deploy script to the new Artisan command. |
| src/Commands/DeployCommand.php | Implements the deploy UX, chart/release resolution, prompting, and Helm invocation. |
| src/BeaconServiceProvider.php | Registers the new beacon:deploy command. |
| README.md | Updates example managed scripts to use the new deploy command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
php artisan beacon:deploycommand that discovers Kubernetes contexts, lets the user choose a target, and confirms the namespace before Helm runsTesting
Closes #46