-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: Add drift information to the CRP status #913
Conversation
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.
Just a few nits; otherwise LGTM
|
||
// The ObservedGeneration of the resource on the target cluster that caused this drift. | ||
// +kubebuilder:validation:Required | ||
ObservedGeneration int64 `json:"observedGeneration"` |
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.
Hi Ryan! Just a quick question: this assumes that we will be switching to our own condition implementations to relay this piece of information back, right?
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.
Also, considering that observedGeneration
is kind of a well-known name in the K8s community, do we want to be more specific that it's about the generation on the target cluster? This is just a nit though, of course.
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.
Just a random thought, but a driftedSince
field could also be useful, just to pinpoint the cause
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.
Add observedAt to denote when the observation is made?
// We will also emit an event with the difference details. | ||
// +kubebuilder:validation:maxLength=8192 | ||
// +kubebuilder:validation:Optional | ||
DriftDetail string `json:"driftDetail,omitempty"` |
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.
TBH I am a bit worried about the size limit as well. Should we mention directly that we might be truncating this information as necessary and the user is expected to check on their own for large diffs?
// +kubebuilder:validation:Required | ||
ResourceIdentifier `json:",inline"` | ||
|
||
// The ObservedGeneration of the resource on the target cluster that caused this drift. |
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.
// The ObservedGeneration of the resource on the target cluster that caused this drift. | |
// The ObservedGeneration of the resource on the target cluster that contains this drift. |
|
||
// The ObservedGeneration of the resource on the target cluster that caused this drift. | ||
// +kubebuilder:validation:Required | ||
ObservedGeneration int64 `json:"observedGeneration"` |
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.
Add observedAt to denote when the observation is made?
Description of your changes
Add drift information to the CRP status
Fixes #
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer