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.
This PR is a response to the feature requested in #1556
The changes contained in the PR only add support for TCP Canary deployments if the user has configured Flagger to use the istio
meshProvider
.When the user deploys their
Canary
document, Flagger will check if theCanary.service.appProtocol
key has been set toTCP
(case insensitive).If the value equals
TCP
then it will deploy theVirtualService
document with atcp
section (instead of the defaulthttp
section that it uses now without this feature). After theVirtualService
document is deployed it will look similar to the below example:Notice the
tcp
section. Once theCanary
switches toProgressing
phase Flagger will be able to adjust theweight
keys as expected during the evaluation period. Once completed, Flagger can promote the canary to the primary as expected. Likewise, if the canary fails the analysis, it will go into anerror
state just like it does normally.If the user doesn't set the
Canary.service.appProtocol
key or they set it to anything other thanTCP
(likehttp
) theCanary
will be treated as it is now (without these changes) and Flagger will deploy theVirtualService
document with thehttp
section and it will also be able to update the weights as it normally does during canary deployments.Closes: #1556