🐛 [scanner] fix: add nil guards for k8s client in API handlers#18251
Conversation
…oxy handlers Signed-off-by: GitHub Copilot <copilot@github.com>
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Fixes #18246
Adds nil guards for the k8s MultiClusterClient in kagenti provider proxy handlers that were panicking with nil pointer dereferences:
handleGetClusterList- guards against nil before callingDeduplicatedClustershandleGetPodList- guards against nil before callingGetPodshandleGetEvents- guards against nil before callingGetEventsAll three handlers now return 503 Service Unavailable when the k8s client is not initialized, consistent with the pattern used in other handlers like
admission_webhooks.go,lima.go, andcrds.go.