Open EigoOda opened 11 months ago
I had the same issue when you have an existing virtual service that contains gateway and hostname information, applying a new virtual service change for delegation by flagger; it did not clean up gateway and hostname value.
if delegation: true
is set while a VirtualService has already been created by Flagger, there are no changes to the newSpec. Therefore, I suspect that the hosts and gateway are not removed.
[MEMO] Code of the relevant part https://github.com/fluxcd/flagger/blob/9a0c6e7e54e3e822f9b505f3fb404bec77aeae55/pkg/router/istio.go#L325-L364
Describe the bug
Delegation was enabled for applications that have Flagger deployed. The delegation is now enabled, but I think the VirtualService created by Canary is displayed incorrectly.
When enabling the delegation for Canary, which has already been created, I also deleted the gateways and hosts. The gateways and hosts of Canary were deleted, but the gateways and hosts of the VirtualService created by Canary remain on the surface.
Flagger log(only this)
To Reproduce
Deploy canary
Enable delegation and Deploy VirtualService
Didn't delete GATEWAYS and HOSTS from app1 VirtualService
When I check annotations, they appear to have been deleted.
Workaround?
I found that deleting Gateways and hosts from the VirtualService created by Canary. Delete
spec.service.retries
from canary, Gateways and hosts are deleted from the VirtualService.Expected behavior
Delete Gateways and Hosts from the VirtualService created by Canary.
Additional context