mirror of
https://github.com/skoelle/kctl-tui.git
synced 2026-09-17 20:10:24 +00:00
docs: update PLAN.md to reflect the redesigned secrets workflow (list + diff-all-fields + whole-secret force-sync)
This commit is contained in:
@@ -10,44 +10,59 @@ is still open. For the full requirements, see [SPEC.md](SPEC.md).
|
|||||||
cross-platform build matrix (linux/darwin/windows x amd64/arm64) that
|
cross-platform build matrix (linux/darwin/windows x amd64/arm64) that
|
||||||
attaches binaries to GitHub Releases on version tags.
|
attaches binaries to GitHub Releases on version tags.
|
||||||
- [x] `install.sh` for Linux/macOS/WSL, downloading the latest release
|
- [x] `install.sh` for Linux/macOS/WSL, downloading the latest release
|
||||||
asset.
|
asset, with clear diagnostics if no release exists yet or the GitHub
|
||||||
|
API is unreachable.
|
||||||
- [x] `README.md`, `config.example.yaml`.
|
- [x] `README.md`, `config.example.yaml`.
|
||||||
|
|
||||||
## Phase 1 — Core logic + navigation (done, initial version)
|
## Phase 1 — Core logic + navigation (done, initial version)
|
||||||
|
|
||||||
- [x] `internal/kctl`: pure, unit-tested logic —
|
- [x] `internal/kctl`: pure, unit-tested logic —
|
||||||
context-pair matching (`FindNextContext`) and namespace/label
|
context-pair matching (`FindNextContext`), namespace/label filtering
|
||||||
filtering (`DistinctLabelValues`, `NamespacesForLabelValue`).
|
(`DistinctLabelValues`, `NamespacesForLabelValue`), and secret diffing
|
||||||
|
(`DiffSecretValues`, `AnyMismatch`).
|
||||||
- [x] `internal/config`: YAML config loading (`context_pairs`,
|
- [x] `internal/config`: YAML config loading (`context_pairs`,
|
||||||
`team_label_key`), with safe defaults when no config file exists yet.
|
`team_label_key`), with safe defaults when no config file exists yet.
|
||||||
- [x] `internal/kubeexec`: thin wrappers around `kubectl`/`aws` CLI calls
|
- [x] `internal/kubeexec`: thin wrappers around `kubectl`/`aws` CLI calls
|
||||||
(contexts, namespaces, deployments, rollout restart/status, secret
|
(contexts, namespaces, deployments, rollout restart/status, listing
|
||||||
read, ExternalSecret annotation).
|
AWS secrets, reading all fields of a Kubernetes secret, ExternalSecret
|
||||||
|
annotation).
|
||||||
- [x] `cmd/kctl-tui` "full" mode: Bubble Tea navigation for
|
- [x] `cmd/kctl-tui` "full" mode: Bubble Tea navigation for
|
||||||
context -> team -> namespace, with `Esc` correctly popping back one
|
context -> team -> namespace, with `Esc` correctly popping back one
|
||||||
level at a time, defaults pre-selected from the currently active
|
level at a time, defaults pre-selected from the currently active
|
||||||
context/namespace.
|
context/namespace.
|
||||||
- [x] On confirming a namespace, "full" mode launches the 3-pane `tmux`
|
- [x] On confirming a namespace, "full" mode launches the 3-pane `tmux`
|
||||||
session (control pane + two `k9s` panes) via `tea.ExecProcess` and
|
session (control pane + two `k9s` panes, `even-vertical` layout,
|
||||||
resumes at the namespace screen once the session ends.
|
`remain-on-exit` so a crashing control pane stays visible) via
|
||||||
- [x] `cmd/kctl-tui` "panel" mode: menu for Redeploy and the AWS/Kubernetes
|
`tea.ExecProcess` and resumes at the namespace screen once the
|
||||||
secrets diff + force-sync wizard, with `Esc` closing the whole tmux
|
session ends.
|
||||||
session (`tmux kill-session`).
|
- [x] `cmd/kctl-tui` "panel" mode:
|
||||||
|
- Redeploy: pick a deployment from a list, confirm, then
|
||||||
|
`rollout restart` + `rollout status`.
|
||||||
|
- Secrets: pick an AWS region, then pick the actual secret from a
|
||||||
|
**list of all AWS Secrets Manager secrets** in that region (no more
|
||||||
|
manual secret-ID typing), enter the matching Kubernetes secret
|
||||||
|
name, and automatically diff **every field** of both secrets in one
|
||||||
|
table (key / AWS value / Kubernetes value / match status). If any
|
||||||
|
field differs, offer a single force-sync request for the **whole
|
||||||
|
secret** (one ExternalSecret annotation), not per individual field.
|
||||||
|
- `Esc` closes the whole tmux session (`tmux kill-session`).
|
||||||
|
|
||||||
## Phase 2 — Hardening (open)
|
## Phase 2 — Hardening (open)
|
||||||
|
|
||||||
- [ ] Replace the hand-rolled AWS secret JSON parsing/`fmt.Sprintf` value
|
- [ ] Handle non-JSON AWS secrets and Kubernetes secrets with binary
|
||||||
formatting with a proper typed decode, and handle secrets that are
|
(non-UTF8) values more gracefully in the diff table (currently
|
||||||
plain strings rather than JSON.
|
falls back to a single "value" key or may render oddly).
|
||||||
- [ ] Add integration-style tests against a local `kind`/`k3d` cluster in
|
- [ ] Add integration-style tests against a local `kind`/`k3d` cluster in
|
||||||
CI for the `kubeexec` wrappers currently excluded from automated
|
CI for the `kubeexec` wrappers currently excluded from automated
|
||||||
testing.
|
testing.
|
||||||
- [ ] Input validation for the free-text steps in "panel" mode (empty
|
- [ ] Input validation for the free-text steps in "panel" mode (empty
|
||||||
secret ID/region/name, invalid characters).
|
region/secret name, invalid characters).
|
||||||
- [ ] Graceful handling when `tmux`, `k9s`, or `aws` are not installed
|
- [ ] Graceful handling when `tmux`, `k9s`, or `aws` are not installed
|
||||||
(currently surfaces the raw exec error).
|
(currently surfaces the raw exec error).
|
||||||
- [ ] Structured logging / `--verbose` flag for troubleshooting failed
|
- [ ] Structured logging / `--verbose` flag for troubleshooting failed
|
||||||
`kubectl` calls.
|
`kubectl`/`aws` calls.
|
||||||
|
- [ ] Paginate/scroll the secrets diff table for secrets with many fields
|
||||||
|
instead of relying on terminal wrapping.
|
||||||
|
|
||||||
## Phase 3 — Windows-native support (open, secondary priority)
|
## Phase 3 — Windows-native support (open, secondary priority)
|
||||||
|
|
||||||
@@ -67,6 +82,9 @@ is still open. For the full requirements, see [SPEC.md](SPEC.md).
|
|||||||
kubeconfig.
|
kubeconfig.
|
||||||
- [ ] Homebrew tap / `scoop` manifest as additional install options
|
- [ ] Homebrew tap / `scoop` manifest as additional install options
|
||||||
alongside `install.sh`.
|
alongside `install.sh`.
|
||||||
|
- [ ] Optional heuristic to suggest a matching Kubernetes secret name for
|
||||||
|
a chosen AWS secret (e.g. by common naming convention), instead of
|
||||||
|
always asking for it manually.
|
||||||
|
|
||||||
## Notes for contributors
|
## Notes for contributors
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user