feat(tools): orchestrator-agnostic change & deploy inquiry (Phase 1/4)#104
Merged
Conversation
… 1/4) Add a read-only change.recent tool that reports recent rollout, image, scale, and restart events for a workload across both Kubernetes and Docker on one newest-first timeline. Introduces a ChangeSource seam with k8s and docker implementations, a read-only Docker client adapter (list/inspect only), and a DockerHosts config field. Phase 1 of #100. Signed-off-by: rlaope <piyrw9754@gmail.com>
- k8s: match ControllerRevisions by owner kind+name so a same-named StatefulSet and DaemonSet no longer duplicate each other's rollout events - k8s: skip the Events field-selector query when the workload contains selector metacharacters instead of silently returning zero events - docker: validate Docker host endpoints eagerly in NewHub (an empty endpoint is a config error, not a silent DOCKER_HOST fallback) - docker: match workloads and image repos by exact name/segment rather than substring, so "api" no longer matches "api-gateway" - docker: drop the misleading digest to tag "image" diff and skip images with an unset creation time Phase 1 of #100. Signed-off-by: rlaope <piyrw9754@gmail.com>
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.
Summary
change.recenttool that reports recent rollout / image / scale / restart events for a workload across both Kubernetes and Docker on one newest-first timeline.ChangeSourceseam (internal/core/tools/change/) with k8s and docker implementations, plus a read-only Docker client adapter (internal/clients/docker/, list/inspect only) and aDockerHostsconfig field.Closes #100.
What's new
internal/core/tools/change/—ChangeSourceinterface +ChangeEvent/ChangeQuery+MergeSorted;K8sSource(deployment/statefulset/daemonset revisions via ReplicaSet/ControllerRevision, rollout, image, scale, HPA, events);DockerSource(container_create/restart, running image, image_pull);change.recenttool (RiskLow).internal/clients/docker/— read-only Docker SDK adapter (v28.5.2), Hub/Client by host name.internal/clients/k8s/client.go—ReplicaSets+ControllerRevisionsaccessors.internal/config/config.go—DockerHostsfield;internal/wiring/tools.go— change-group wiring (registers with whichever backend is available; honest skip reason).Test plan
go build ./...go test ./...(no-cache; 19 new tests in change pkg, all green)golangci-lint v2.12 run ./...→ 0 issuesgo vet ./.../gofmtclean🤖 Generated with Claude Code