Skip to content

bundle/krew: use kubectl-krew directly#22328

Merged
MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
branchv:krew
May 18, 2026
Merged

bundle/krew: use kubectl-krew directly#22328
MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
branchv:krew

Conversation

@branchv
Copy link
Copy Markdown
Member

@branchv branchv commented May 17, 2026


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes. Non-maintainers may only have one AI-assisted/generated PR open at a time.

A kubectl extension is just a kubectl-* executable on PATH, so we can simplify a bit here and just invoke kubectl-krew directly

Copilot AI review requested due to automatic review settings May 17, 2026 20:11
Copy link
Copy Markdown
Contributor

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

A kubectl plugin is just a kubectl-* executable on PATH, so this PR simplifies the Krew bundle extension by locating and invoking kubectl-krew directly instead of going through kubectl krew …. This removes the need for the separate package_manager_installed? probe (which previously shelled out to kubectl krew version) and lets the base class's executable-presence check do the work.

Changes:

  • Switch package_manager_executable lookup from kubectl to kubectl-krew.
  • Drop the custom package_manager_installed? override and its @krew_installed cache.
  • Update packages and install_package! to call the kubectl-krew binary without the "krew" subcommand argument.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Library/Homebrew/bundle/extensions/krew.rb
Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Thanks! A few questions.

Comment thread Library/Homebrew/bundle/extensions/krew.rb
Comment thread Library/Homebrew/bundle/extensions/krew.rb
Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue May 18, 2026
Merged via the queue into Homebrew:main with commit 0379f4e May 18, 2026
36 checks passed
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.

3 participants