Skip to content

Comments

Add evaluate capabilities#17

Merged
eminano merged 1 commit intomainfrom
add-evaluate-capability-to-plugin
Aug 8, 2025
Merged

Add evaluate capabilities#17
eminano merged 1 commit intomainfrom
add-evaluate-capability-to-plugin

Conversation

@eminano
Copy link
Contributor

@eminano eminano commented Aug 7, 2025

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).

@eminano eminano requested a review from Copilot August 7, 2025 14:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_EVALUATE operation 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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel there is a story behind this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have spent too much time testing against the wrong controller version 🥸

@eminano eminano merged commit 1bb54d3 into main Aug 8, 2025
4 checks passed
@eminano eminano deleted the add-evaluate-capability-to-plugin branch August 8, 2025 08:13
@github-actions
Copy link

github-actions bot commented Aug 8, 2025

🧹 PR Resources Cleaned Up

Since this PR has been merged, the following test resources have been automatically deleted:

  • Container images: pr-17-*
  • Kubernetes manifest artifacts

Thanks for testing! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants