Skip to content

v1.1.1 — services 'l' tails all pods

Latest

Choose a tag to compare

@LywwKkA-aD LywwKkA-aD released this 11 May 22:37
· 1 commit to master since this release

Tiny but high-impact follow-up to v1.1.0: pressing `l` on a service
row now opens the multi-pod logs view tailing every replica behind that
service.

Why

Users who think in Services kept getting the "select a deployment to
tail its logs" affordance only from the Deployments view. The two ways
of finding a workload (`:svc` vs `:deploy`) should reach the same
place; they now do.

What

  • New resolver `Client.PodsAndContainersForService(ctx, ns, name)` in
    `internal/k8s/services.go`. One `Pods.List` against the service's
    label selector returns both the pod names (for the stream) and the
    container set (for the picker — read off the first matching pod
    since a Service has no template of its own).
  • Selector-less services (headless / ExternalName / manually-managed
    Endpoints) silently no-op instead of erroring at the user.
  • `internal/tui/views/services/services.go` gets the `logsKey` ('l')
    binding with help label "tail all pods". One-container pods route
    straight to the tail prompt; multi-container pods go through the
    container picker first — exactly like the deployments view.
  • Footer hint: `l tail all pods` shows up next to `enter describe`.

Coverage

4 new tests in `internal/k8s/services_test.go` (happy path, selector-
less, no matching pods, missing service) using `kubernetes/fake`.

Quality

  • `go vet` ✓
  • `golangci-lint` ✓ (0 issues)
  • race detector clean

Install

```bash
go install github.com/LywwKkA-aD/k4s/cmd/k4s@v1.1.1
```

Website: https://k4scli.io