Skip to content

Commit

Permalink
feat: Allow Traffic shaping through header based routing ALB fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Andrii Perenesenko <andrii.perenesenko@gmail.com>
  • Loading branch information
perenesenko committed May 31, 2022
1 parent a31db2e commit b31015b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/apis/rollouts/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ func ValidateRolloutStrategyCanary(rollout *v1alpha1.Rollout, fldPath *field.Pat
trafficRouting := rollout.Spec.Strategy.Canary.TrafficRouting
if trafficRouting == nil || (trafficRouting.Istio == nil && trafficRouting.ALB == nil) {
allErrs = append(allErrs, field.Invalid(stepFldPath.Child("setHeaderRouting"), step.SetHeaderRouting, InvalidSetHeaderRoutingTrafficPolicy))
}
if step.SetHeaderRouting.Match != nil && len(step.SetHeaderRouting.Match) > 0 {
} else if step.SetHeaderRouting.Match != nil && len(step.SetHeaderRouting.Match) > 0 {
for j, match := range step.SetHeaderRouting.Match {
if trafficRouting.ALB != nil {
matchFld := stepFldPath.Child("setHeaderRouting").Child("match").Index(j)
Expand Down

0 comments on commit b31015b

Please sign in to comment.