Summary
In all three workload controllers (MCPServer, VirtualMCPServer, MCPRemoteProxy), handleOIDCConfig sets the OIDCConfigRefValidated condition to True in memory after validation passes, but only calls r.Status().Update() inside the if hash changed block. If the condition was previously False (e.g., after a transient error where the MCPOIDCConfig was temporarily unavailable) and is now True, but the config hash hasn't changed, the condition update is never persisted.
Scenario
- MCPOIDCConfig exists and is valid → hash stored, condition=True
- MCPOIDCConfig temporarily deleted → condition set to False, phase=Failed
- MCPOIDCConfig re-created with same content (same hash) → condition set to True in memory but
Status().Update() skipped because hash is unchanged
The condition eventually self-heals on the next reconcile that changes hash or on a full resync, but there's a window where the status is stale.
Affected controllers
MCPServerReconciler.handleOIDCConfig (mcpserver_controller.go)
VirtualMCPServerReconciler.handleOIDCConfig (virtualmcpserver_controller.go)
MCPRemoteProxyReconciler.handleOIDCConfig (mcpremoteproxy_controller.go)
Proposed fix
After setting the valid condition and checking the hash, add an unconditional status update if the condition changed (similar to how MCPOIDCConfigReconciler.Reconcile handles conditionChanged). Alternatively, always persist status when the condition transitions from False→True regardless of hash state.
Severity
Low — the condition self-heals on the next reconcile cycle that triggers a status write. No functional impact on workload deployment since the reconcile loop continues past this point.
Summary
In all three workload controllers (MCPServer, VirtualMCPServer, MCPRemoteProxy),
handleOIDCConfigsets theOIDCConfigRefValidatedcondition to True in memory after validation passes, but only callsr.Status().Update()inside theif hash changedblock. If the condition was previously False (e.g., after a transient error where the MCPOIDCConfig was temporarily unavailable) and is now True, but the config hash hasn't changed, the condition update is never persisted.Scenario
Status().Update()skipped because hash is unchangedThe condition eventually self-heals on the next reconcile that changes hash or on a full resync, but there's a window where the status is stale.
Affected controllers
MCPServerReconciler.handleOIDCConfig(mcpserver_controller.go)VirtualMCPServerReconciler.handleOIDCConfig(virtualmcpserver_controller.go)MCPRemoteProxyReconciler.handleOIDCConfig(mcpremoteproxy_controller.go)Proposed fix
After setting the valid condition and checking the hash, add an unconditional status update if the condition changed (similar to how
MCPOIDCConfigReconciler.ReconcilehandlesconditionChanged). Alternatively, always persist status when the condition transitions from False→True regardless of hash state.Severity
Low — the condition self-heals on the next reconcile cycle that triggers a status write. No functional impact on workload deployment since the reconcile loop continues past this point.