Skip to content

Commit

Permalink
Merge pull request #3739 from chaunceyjiang/application_failover
Browse files Browse the repository at this point in the history
fix: when application failover is enabled but propagateDeps is set to false, the failover has no effect
  • Loading branch information
karmada-bot authored Jun 30, 2023
2 parents c921acd + 0b86e0d commit de09d89
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/util/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ const LabelValueMaxLength int = 63
func ValidatePropagationSpec(spec policyv1alpha1.PropagationSpec) field.ErrorList {
var allErrs field.ErrorList
allErrs = append(allErrs, ValidatePlacement(spec.Placement, field.NewPath("spec").Child("placement"))...)
if spec.Failover != nil && spec.Failover.Application != nil && !spec.PropagateDeps {
allErrs = append(allErrs, field.Invalid(field.NewPath("spec").Child("propagateDeps"), spec.PropagateDeps, "application failover is set, propagateDeps must be true"))
}
allErrs = append(allErrs, ValidateFailover(spec.Failover, field.NewPath("spec").Child("failover"))...)
return allErrs
}
Expand Down

0 comments on commit de09d89

Please sign in to comment.