add canary-weight-total annotation (#6338)

This commit is contained in:
Yecheng Fu 2021-12-08 00:40:00 +08:00 committed by GitHub
parent 6163231ef6
commit 5cff197bc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 71 additions and 5 deletions

View file

@ -896,6 +896,7 @@ func (n *NGINXController) createUpstreams(data []*ingress.Ingress, du *ingress.B
upstreams[defBackend].NoServer = true
upstreams[defBackend].TrafficShapingPolicy = ingress.TrafficShapingPolicy{
Weight: anns.Canary.Weight,
WeightTotal: anns.Canary.WeightTotal,
Header: anns.Canary.Header,
HeaderValue: anns.Canary.HeaderValue,
HeaderPattern: anns.Canary.HeaderPattern,