Skip to content

Commit fdc7ac6

Browse files
authored
Merge pull request #3766 from RuliXu/automated-cherry-pick-of-#3739-upstream-release-1.6
Automated cherry pick of #3739: fix: when application failover is enabled but propagateDeps
2 parents c31e161 + 7424a0f commit fdc7ac6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/util/validation/validation.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ const LabelValueMaxLength int = 63
2222
func ValidatePropagationSpec(spec policyv1alpha1.PropagationSpec) field.ErrorList {
2323
var allErrs field.ErrorList
2424
allErrs = append(allErrs, ValidatePlacement(spec.Placement, field.NewPath("spec").Child("placement"))...)
25+
if spec.Failover != nil && spec.Failover.Application != nil && !spec.PropagateDeps {
26+
allErrs = append(allErrs, field.Invalid(field.NewPath("spec").Child("propagateDeps"), spec.PropagateDeps, "application failover is set, propagateDeps must be true"))
27+
}
2528
allErrs = append(allErrs, ValidateFailover(spec.Failover, field.NewPath("spec").Child("failover"))...)
2629
return allErrs
2730
}

0 commit comments

Comments
 (0)