Skip to content

feat: add Kubernetes context selection to beacon:deploy#55

Merged
ibourgeois merged 2 commits intomainfrom
feat/46-kubernetes-context-selection
Apr 9, 2026
Merged

feat: add Kubernetes context selection to beacon:deploy#55
ibourgeois merged 2 commits intomainfrom
feat/46-kubernetes-context-selection

Conversation

@ibourgeois
Copy link
Copy Markdown
Contributor

Summary

  • add a real php artisan beacon:deploy command that discovers Kubernetes contexts, lets the user choose a target, and confirms the namespace before Helm runs
  • introduce a small deploy layer for Kubernetes context discovery and Helm execution so deploy behavior is easier to extend later
  • update Beacon-managed Composer deploy scripts to call the new Artisan command instead of embedding a fixed Helm command

Testing

php84 vendor/bin/pest tests/Feature/DeployCommandTest.php tests/Unit/Composer/ComposerScriptsUpdaterTest.php tests/Feature/InstallCommandTest.php
php84 "/Users/ibourgeois/Library/Application Support/Herd/bin/composer" test
php84 "/Users/ibourgeois/Library/Application Support/Herd/bin/composer" validate --strict --no-check-publish

Closes #46

Copilot AI review requested due to automatic review settings April 9, 2026 04:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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\DeployCommand and 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.

Comment thread src/Commands/DeployCommand.php Outdated
Comment thread src/Commands/DeployCommand.php Outdated
Comment thread src/Deploy/HelmReleaseDeployer.php Outdated
@ibourgeois ibourgeois merged commit 097163d into main Apr 9, 2026
12 checks passed
@ibourgeois ibourgeois deleted the feat/46-kubernetes-context-selection branch April 9, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add Kubernetes context selection to beacon:deploy

2 participants