Skip to content

Conversation

@jlewitt1
Copy link
Collaborator

@jlewitt1 jlewitt1 commented Jan 6, 2026

Summary

  • Reduces API calls to controller by using new consolidated list_resources endpoint
  • Replaces multiple pure K8s proxy calls with single consolidated calls that include server-side filtering and business logic

Changes

New client method

  • Added list_resources(resource_type, namespace, label_selector, field_selector, include_events) to ControllerClient

Updated commands/functions to use consolidated endpoint

  • kt volumes -A: N calls → 1 call (was looping through namespaces)
  • kt list: N+1 calls → 2 calls (revision resources now fetched in batch)
  • kt status: Uses resource from service_status() instead of extra API call
  • load_configmaps(): Uses list_resources("configmaps")
  • check_pod_events_for_errors(): Uses list_resources("events")
  • check_replicaset_events_for_errors(): Uses list_resources("replicasets", include_events=True)

Removed deprecated client methods

  • list_pvcs() → use list_resources("volumes")
  • list_namespaced_replica_set() → use list_resources("replicasets")
  • list_config_maps() → use list_resources("configmaps")
  • list_events() → use list_resources("events")

Copy link
Collaborator Author

jlewitt1 commented Jan 6, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jlewitt1 jlewitt1 force-pushed the consolidate-k8s-resource-listing branch from cd2c005 to 6c56bde Compare January 6, 2026 10:30
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from a28324d to e2f0a22 Compare January 6, 2026 16:25
@jlewitt1 jlewitt1 force-pushed the consolidate-k8s-resource-listing branch 2 times, most recently from 2c27f2d to d363444 Compare January 6, 2026 17:04
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch 2 times, most recently from 89c692d to 22728fa Compare January 6, 2026 17:06
@jlewitt1 jlewitt1 force-pushed the consolidate-k8s-resource-listing branch from d363444 to 26ee636 Compare January 6, 2026 17:06
@dongreenberg dongreenberg force-pushed the consolidate-status-checks branch from 22728fa to 8a4dc6e Compare January 6, 2026 17:09
@dongreenberg dongreenberg force-pushed the consolidate-k8s-resource-listing branch from 26ee636 to 0579784 Compare January 6, 2026 17:10
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from 8a4dc6e to 4db9bd4 Compare January 6, 2026 18:10
@jlewitt1 jlewitt1 force-pushed the consolidate-k8s-resource-listing branch from 0579784 to 9c26f6a Compare January 6, 2026 18:10
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from 4db9bd4 to 7d1bc83 Compare January 6, 2026 21:22
@jlewitt1 jlewitt1 force-pushed the consolidate-k8s-resource-listing branch from 9c26f6a to 538223a Compare January 6, 2026 21:22
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from 7d1bc83 to 2865dd8 Compare January 7, 2026 11:27
@jlewitt1 jlewitt1 force-pushed the consolidate-k8s-resource-listing branch 5 times, most recently from 4ac5632 to 6fa2160 Compare January 7, 2026 20:35
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch 2 times, most recently from fff95aa to 4251965 Compare January 7, 2026 20:57
@jlewitt1 jlewitt1 force-pushed the consolidate-k8s-resource-listing branch from 6fa2160 to 04ffd0c Compare January 7, 2026 20:57
@jlewitt1 jlewitt1 force-pushed the consolidate-status-checks branch from 4251965 to 6d95474 Compare January 8, 2026 08:45
@jlewitt1 jlewitt1 force-pushed the consolidate-k8s-resource-listing branch from 04ffd0c to ef06929 Compare January 8, 2026 08:45
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.

2 participants