rpk: add k8s managed plugin command (rpk k8s) [K8S-851]#30833
Open
RafalKorepta wants to merge 7 commits into
Open
rpk: add k8s managed plugin command (rpk k8s) [K8S-851]#30833RafalKorepta wants to merge 7 commits into
RafalKorepta wants to merge 7 commits into
Conversation
Open
5 tasks
Collaborator
CI test resultstest results on build#85905
|
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.
Adds
rpk k8sas a managed rpk plugin (slugk8s), modeled on the existingrpk aiplugin. Today the Kubernetes CLI ships only inside the redpanda-operator repo; this makes it discoverable and installable straight fromrpk. On the firstrpk k8s <subcommand>, rpk downloads the matching binary fromhttps://rpk-plugins.redpanda.com/k8s/manifest.json, verifies its sha256, caches it at~/.local/bin/.rpk.managed-k8s, and execs it. The binaries + manifest are published by the paired operator PR: redpanda-data/redpanda-operator#1611.New package
src/go/rpk/pkg/cli/k8s/(replacing a stale, never-wiredpackage connectscaffold):client.go— slugk8s, repo client.k8s.go—init()registers the managed plugin (plugin.RegisterManaged);NewCommandauto-installs on first subcommand and execs the plugin; addsinstall/uninstall/upgrade.hook.go— flag-strip only. Unlikerpk ai, the k8s plugin reads kubeconfig itself (kubectl-style), so no cloud token/endpoint/env is injected.install.go/upgrade.go/uninstall.go— lifecycle: manifest lookup, download+verify,--plugin-version,--force,--no-confirm. FIPS is gated (no FIPS build yet; tracked separately under K8S-851).root.go; BUILD files added.Pairs with redpanda-data/redpanda-operator#1611. Refs K8S-851.
Backports Required
UX Changes
rpk k8sfor interacting with Redpanda clusters on Kubernetes. The plugin binary is downloaded and managed automatically on first use; it can also be managed explicitly withrpk k8s install(--plugin-version,--force),rpk k8s upgrade(--no-confirm), andrpk k8s uninstall.rpk k8s multicluster ...,rpk k8s version) are provided by the downloaded binary.rpk k8s installexits with a clear "not yet available in FIPS mode" message.Release Notes
Features
rpk k8s, a managed plugin for interacting with Redpanda clusters running on Kubernetes. On first use rpk auto-downloads, checksum-verifies, and caches the plugin from the Redpanda plugin repository; manage it explicitly withrpk k8s install/upgrade/uninstall.