Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds evaluate capabilities to the lifecycle plugin, enabling the scale to zero plugin to inject sidecars for existing clusters when they are patched (e.g., when plugins are added to cluster specs), not just for newly created clusters. The changes extend the plugin's operation types and update installation documentation.
- Added
TYPE_EVALUATEoperation capability to handle cluster patches and rollouts - Updated lifecycle hook logic to process both CREATE and EVALUATE operations
- Updated installation documentation to require CloudNativePG version 1.26.0
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/plugin/lifecycle/lifecycle.go | Adds EVALUATE operation type to capabilities and extends reconciliation logic to handle both CREATE and EVALUATE operations |
| INSTALL.md | Updates CloudNativePG version requirement from 1.24.1 to 1.26.0 and improves formatting |
| kind create cluster --name cnpg-i-scale-to-zero | ||
|
|
||
| # Install CloudNativePG | ||
| # Install CloudNativePG (at least version 1.26.0) |
There was a problem hiding this comment.
I feel there is a story behind this
There was a problem hiding this comment.
I might have spent too much time testing against the wrong controller version 🥸
|
🧹 PR Resources Cleaned Up Since this PR has been merged, the following test resources have been automatically deleted:
Thanks for testing! 🎉 |
This PR adds evaluate capabilities to the lifecycle implementation. This will allow the scale to zero plugin to inject the sidecar not only for new clusters, but also for existing ones, by reacting to the rollout triggered by cluster patches (such as adding a plugin to the cluster spec).