Skip to content

feat: implement HasGVKs for single cluster provider#1193

Merged
Cali0707 merged 2 commits into
containers:mainfrom
shahsahil264:OCPMCP-327-has-gvks-single-cluster
Jun 10, 2026
Merged

feat: implement HasGVKs for single cluster provider#1193
Cali0707 merged 2 commits into
containers:mainfrom
shahsahil264:OCPMCP-327-has-gvks-single-cluster

Conversation

@shahsahil264

Copy link
Copy Markdown
Contributor

Summary

  • Implement real HasGVKs logic for singleClusterProvider, replacing the no-op stub that always returned true.
  • Uses the cluster's REST mapper to verify that every requested GVK is available on the cluster.
  • Includes a nil guard on the manager to safely return true (keeping tools visible) if the provider is not yet initialized.

Test plan

  • Unit tests covering nil, empty, single valid, all valid, single invalid, and mixed GVK lists
  • All existing tests pass

Implements: OCPMCP-327

Signed-off-by: Sahil Shah <sahshah@redhat.com>
@shahsahil264

Copy link
Copy Markdown
Contributor Author

@Cali0707 PTAL
Thanks!

@shahsahil264

Copy link
Copy Markdown
Contributor Author

/assign @Cali0707

@Cali0707 Cali0707 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks great @shahsahil264 !

Just one small comment about needing a log, then lets get this PR in!

Comment thread pkg/kubernetes/provider_single.go
Signed-off-by: Sahil Shah <sahshah@redhat.com>
@shahsahil264
shahsahil264 requested a review from Cali0707 June 10, 2026 18:23

@Cali0707 Cali0707 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Cali0707
Cali0707 merged commit 50fa626 into containers:main Jun 10, 2026
11 checks passed
anandrkskd pushed a commit to anandrkskd/openshift-mcp-server that referenced this pull request Jun 25, 2026
@manusa manusa added this to the 0.1.0 milestone Jul 3, 2026
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.

3 participants