-
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
fix: only mark a binding apply failed if there are failed manifest #802
Conversation
return metav1.Condition{ | ||
Status: metav1.ConditionFalse, | ||
Type: string(fleetv1beta1.ResourceBindingApplied), | ||
Reason: condition.WorkNotAppliedReason, |
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.
should we use "WorkFailedReason"?
Status: metav1.ConditionFalse, | ||
Type: string(fleetv1beta1.ResourceBindingApplied), | ||
Reason: condition.WorkNotAppliedReason, | ||
Message: fmt.Sprintf("Work object %s is not applied", notAppliedWork), |
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.
Message: fmt.Sprintf("Work object %s is not applied", notAppliedWork), | |
Message: fmt.Sprintf("Failed to apply work object %s", notAppliedWork), |
need to record the failedWork
@@ -170,7 +170,7 @@ func TestBuildAllWorkAppliedCondition(t *testing.T) { | |||
ObservedGeneration: 1, | |||
}, | |||
}, | |||
"applied should be false if not all work applied to the latest generation": { | |||
"applied should be known if not all work applied to the latest generation": { |
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.
"applied should be known if not all work applied to the latest generation": { | |
"applied should be unknown if not all work applied to the latest generation": { |
Description of your changes
Currently, we mark a binding failed if not all work are applied. This causes the CRP controller to try to fill in failed placement from work. So we only mark a binding apply failed if there are failed manifest, CRP condition won't change. This is probably also useful when we start to copy failed manifest to the binding.
Fixes #
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer