Update HTTPMatchRequest to match Istio's definitions#777
Merged
stefanprodan merged 1 commit intofluxcd:mainfrom Jan 15, 2021
Merged
Update HTTPMatchRequest to match Istio's definitions#777stefanprodan merged 1 commit intofluxcd:mainfrom
stefanprodan merged 1 commit intofluxcd:mainfrom
Conversation
Signed-off-by: Hiroki Matsumoto <hiroki.matsumoto.ggg@gmail.com>
6a9b49b to
d15df9a
Compare
stefanprodan
approved these changes
Jan 13, 2021
Member
stefanprodan
left a comment
There was a problem hiding this comment.
LGTM
Thanks @h-r-k-matsumoto 🏅
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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