Skip to content

Update HTTPMatchRequest to match Istio's definitions#777

Merged
stefanprodan merged 1 commit intofluxcd:mainfrom
h-r-k-matsumoto:update-istio-v1alpha3
Jan 15, 2021
Merged

Update HTTPMatchRequest to match Istio's definitions#777
stefanprodan merged 1 commit intofluxcd:mainfrom
h-r-k-matsumoto:update-istio-v1alpha3

Conversation

@h-r-k-matsumoto
Copy link
Contributor

Summary

Fix: #776 , #678

artifacts/flagger/crd.yaml: Update spec.service.match and analysis.match based on Istio's definitions.
pkg/apis/istio/v1alpha3/virtual_service.go: Update based on Istio - virtual_service.pb.go.
pkg/router/istio.go: Changed the merge logic of analysis.match and service.match to avoid missing service.match.

Supplement

As far as I can see in istio.go, Basically when creating VirtualService, Http.Match is just copied from canary.Spec.Service.Match.
So I thnk no change is necessary.
https://github.com/fluxcd/flagger/blob/main/pkg/router/istio.go#L169
https://github.com/fluxcd/flagger/blob/main/pkg/router/istio.go#L193

The analysis part had a specific merge logic, so I changed this code.
https://github.com/fluxcd/flagger/blob/main/pkg/router/istio.go#L442

Signed-off-by: Hiroki Matsumoto <hiroki.matsumoto.ggg@gmail.com>
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @h-r-k-matsumoto 🏅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTPMatchRequest mismatch with istio's definitions

2 participants