Skip to content

Support downloading multi-cluster kubeconfig files with TTL and using kubectl through the Cluster Agent proxy. - #698

Open
TimeBye wants to merge 5 commits into
kite-org:mainfrom
TimeBye:kubeconfig-download
Open

Support downloading multi-cluster kubeconfig files with TTL and using kubectl through the Cluster Agent proxy.#698
TimeBye wants to merge 5 commits into
kite-org:mainfrom
TimeBye:kubeconfig-download

Conversation

@TimeBye

@TimeBye TimeBye commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add secure kubeconfig downloads for user-authorized clusters.
  • Add revocable, stateful kubeconfig tokens with expiration, usage tracking, and user/admin management APIs.
  • Add an authenticated Kubernetes API proxy that validates token, cluster access, and RBAC permissions for every request.
  • Add kubeconfig download and token-management UI, including cluster filtering, bulk selection, TTL presets/custom expiry, and automatic cluster refresh without closing the dialog.
  • Add Helm configuration for dedicated kubeconfig token signing secrets and English/Chinese documentation.
  • Add E2E coverage for the kubeconfig download workflow.

Why

Users need a safe way to download kubeconfig files for selected clusters without exposing permanent credentials. Stateful tokens provide expiration and revocation, while the proxy enforces Kite authorization for Kubernetes API access.

Related issue

Closes #695

Validation

  • go test ./...
  • git diff --check
  • Added backend unit tests for token lifecycle, kubeconfig download, token management, and proxy authorization.
  • Added UI component tests for the download dialog and token-management views.
  • Added Playwright E2E coverage for the kubeconfig download workflow.
  • E2E was not run locally because kind is unavailable in the environment.

Checklist

  • I reviewed this PR myself before requesting review.
  • I understand the changes, including AI-generated parts (if any).
  • For new features, a feature request issue is linked.
  • I cleaned up AI noise (unnecessary comments, dead code, and unrelated changes).
  • This PR is reasonably scoped (or split into smaller PRs).

- Add reusable token issuance and authentication primitives
- Persist kubeconfig token metadata and cluster UUIDs
- Add token configuration, storage, and lifecycle tests
- Generate kubeconfigs for authorized clusters
- Authenticate Kubernetes proxy requests with revocable tokens
- Enforce cluster and RBAC checks for proxied operations
- Cover download, token management, and proxy behavior
- Refresh clusters without unmounting the download dialog
- Add download and token management interfaces
- Add selection summary and matching-cluster controls
- Add localized text and component coverage
- Add dedicated kubeconfig JWT secret and key ID settings
- Preserve generated secrets across Helm upgrades
- Document environment variables and deployment requirements
- Verify the kubeconfig download entry point
- Wait for the named download dialog before exercising the flow
- Cover the end-to-end cluster selection flow
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.

支持下载带 TTL 的多集群 Kubeconfig,并通过 Cluster Agent 代理使用 kubectl

1 participant