-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong assumptions and anti-patterns in InstanceController #422
Comments
Yep. Let's talk about this in community meeting. 1 we have definitely waned to address for a while for reasons unrelated to this, so that's great. I'm thinking this could start this next release cycle for v0.3.1 or v0.4.0. Is there an e2e/intregration test that could make this case fail today just so we have a bar to work against? |
A test following this scenario would probably lead to incorrect behaviour today:
|
NOTE: The update predicate function still inspects the status attribute and has side-effects. This is an anti-pattern that should be solved in a different patch, see #422.
NOTE: The update predicate function still inspects the status attribute and has side-effects. This is an anti-pattern that should be solved in a different patch, see #422.
This is a critical issue... scheduling this fix for a 0.4.x bug fix release or for 0.5.0. |
We started working on this with @kensipe |
From the docs: |
**What this PR does / why we need it**: This is an implementation of controller based on KEP-18. Some highlights: - start reviewing with the Reconcile function https://github.com/kudobuilder/kudo/pull/850/files#diff-45e4638e2c718ccd5d08635baec770b1R98 - plan execution CRD, controller and everything around that was removed - with this PR we temporarily don't really support custom plan execution and for the correct plan execution we need the admission webhook which will come also in another PR Fixes #422
While trying to address a TODO left in the
InstanceController
(#380) I found a few issues:PlanExecution
). Going through the Kubebuilder tutorial, I saw that they strongly discourage operators from doing that:I think that we could address both issues by:
PlanExecution
.InstanceController
use the default predicate.Reconcile
. The new implementation ofReconcile
would then reconstitute state of the world from the latestPlanExecution
, eliminating the need to read thestatus
field or to compare the current version of an instance with an older one.Note that these changes would most likely break backwards compatibility, so I think we should work on this ASAP.
The text was updated successfully, but these errors were encountered: