[PWX-38584][PWX-38575] Updated Autopilot deployment to include readiness probes #1654
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does :
This PR adds Readiness Probes to Autopilot deployments from autopilot versions greater than 1.3.15.
Why we need it
Autopilot relies heavily on Prometheus signals to execute its operations. If Prometheus becomes unreachable, Autopilot's expansion operations will fail.
Users typically become aware of this issue only after an expansion operation fails, which is too late.
To address this, we will add readiness probes to continuously monitor the connectivity between Autopilot and Prometheus. This will allow us to update the pod's readiness status (0/1) in real time, providing better visibility into potential issues and enabling proactive responses rather than waiting for an expansion failure
To address this, we are adding Readiness Probes instead of Liveness Probes. Liveness Probes would restart the pod if they fail, but in this case, a restart won't resolve the issue. Readiness Probes, on the other hand, will update the pod's readiness status (0/1) without triggering unnecessary restarts. This ensures continuous monitoring of the Autopilot-Prometheus connectivity and provides better visibility into potential issues, allowing for proactive responses.
A separate PR will be raised for Autopilot where /ready endpoint would serve the readiness prone hits made by k8s.
Which issue(s) this PR fixes (optional)
https://purestorage.atlassian.net/browse/PWX-38584
https://purestorage.atlassian.net/browse/PWX-38575
Testing
Executed existing unit tests. No failures observed.
Added unit tests for the code added.
Deployed operator image with above change and autopilot:1.3.15. Verified that autopilot deployment does not has Readiness Probe.