feat(controller): emit ServerReady event when Ready transitions to Available#184
Conversation
…able Emit a Normal Kubernetes event when Ready becomes True with reason Available after a successful MCP handshake, using the same transition-guard pattern as Configuration accepted. Part of kubernetes-sigs#109.
✅ Deploy Preview for mcp-lifecycle-operator ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @ibm-adarsh. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
| if r.Recorder == nil { | ||
| return | ||
| } | ||
| r.Recorder.Eventf(mcpServer, nil, corev1.EventTypeNormal, ReasonAvailable, eventActionServerReady, "%s", "MCPServer is ready; Ready=True") |
There was a problem hiding this comment.
could we perhaps do like this:
r.Recorder.Eventf(mcpServer, nil, corev1.EventTypeNormal, ReasonAvailable, eventActionServerReady, "MCPServer %s is ready; Ready=True", mcpServer.Name)that way we have the actual name?
There was a problem hiding this comment.
Sure, Great to have.
Address review feedback on kubernetes-sigs#184.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ibm-adarsh, matzew The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |

Summary
Part of #109 (Kubernetes event coverage).
Emit a Normal Kubernetes event when
Readytransitions toTruewith reasonAvailable, after deployment is healthy and the MCP handshake succeeds. This completes the lifecycle story started in PR #118:ConfigurationAccepted→ ServerReadyUses the same transition-guard pattern as configuration accepted: emit once when
Readywas not previouslyTrue/Available, not on every reconcile.Changes
readyConditionIsAvailable()helper andpendingServerReadyEventguard at reconcile startreconcileHandshake()(not when deployment alone becomes available)emitServerReady():type=Normal,reason=Available, actionServerReadyTest plan
go test ./internal/controller/...— all specs passmcp-lifecycle-dev): new MCPServer showsValid+AvailableeventsAvailableeventMCPEndpointUnavailable, noAvailableeventManual verification