-
Notifications
You must be signed in to change notification settings - Fork 49
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
Fixed predicates to allow events for Etcd resource that have never been reconciled before #900
Conversation
/test pull-etcd-druid-e2e-kind-nondistroless-etcd |
/test pull-etcd-druid-e2e-kind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix @unmarshall.
LGTM !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR.
We should ensure that we fix this bug even for the general use case without the external update event soon.
etcd-druid/internal/controller/utils/reconciler.go
Lines 39 to 48 in df3ff21
// GetLatestEtcdPartialObjectMeta returns the latest version of the Etcd object metadata. | |
func GetLatestEtcdPartialObjectMeta(ctx context.Context, client client.Client, objectKey client.ObjectKey, etcdObjMetadata *metav1.PartialObjectMetadata) ReconcileStepResult { | |
if err := client.Get(ctx, objectKey, etcdObjMetadata); err != nil { | |
if apierrors.IsNotFound(err) { | |
return DoNotRequeue() | |
} | |
return ReconcileWithError(err) | |
} | |
return ContinueReconcile() | |
} |
If the above function is invoked, we know for sure that an event is triggered for a particular etcd CR. Instead of never requeuing if that particular resource is not found, maybe we could requeue after a certain backoff period?
…en (gardener#900) reconciled before (gardener#898)
…en (#900) (#904) reconciled before (#898) Co-authored-by: Madhav Bhargava <[email protected]>
reconciled before (#898)
How to categorize this PR?
/area control-plane
/kind bug
What this PR does / why we need it:
For gardener use cases the predicates for the etcd reconciler have been changed to allow events for existing Etcd resources for which the original
Create
event could not be processed. Subsequent update events triggered by gardenlet reconciliation loop should be allowed to be processed.Which issue(s) this PR fixes:
Partially Fixes #898
Special notes for your reviewer:
This partially fixes #898 for gardener usage. For open source consumption (without gardener) this fix will only work if there is another component which can generate an update event. So we need to further think on how to do this properly for non-gardener use cases.
Release note: