Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Istio VirtualService delegation #715

Merged
merged 12 commits into from
Oct 28, 2020

Conversation

kazukousen
Copy link
Contributor

@kazukousen kazukousen commented Oct 21, 2020

the Istio provider now supports VIrtualService delegate.
https://istio.io/latest/docs/reference/config/networking/virtual-service/#Delegate
for example, if rootVS and delegateVS are there, the VirtualService which Flagger creates can achieve to behave as delegateVS.
it might related #673 .

for that, the Hosts and Gateways must accept an empty to be applied as a delegateVS.

@mathetake
Copy link
Collaborator

@kazukousen should we add some test in pkg/router/istio_test.go?

@kazukousen
Copy link
Contributor Author

@mathetake i see, later i will try adding test.

@kazukousen
Copy link
Contributor Author

kazukousen commented Oct 22, 2020

In addition to unit testing, i have added e2e testing to ensure that the CRD is actually behaving correctly and delegating as expected.

its test want to switch enable/disable to pilot env PILOT_ENABLE_VIRTUAL_SERVICE_DELEGATE.
however, when running a rolling update of istiod by setting env, running 2 replicas will cause a timeout due to insufficient CI machine specs.

My idea is to keep the number of replicas to 1 by adding the --set values.pilot.rollingMaxSurge=0 --set values.pilot.rollingMaxUnavailable=1 option to the installation by istioctl manifest apply.

If you can accept this, I will try it.

@stefanprodan
Copy link
Member

@kazukousen you could also patch istiod and set the memory and cpu requests super low. I am ok with whatever works. Thanks

pkg/router/istio.go Outdated Show resolved Hide resolved
kazukousen and others added 2 commits October 23, 2020 19:02
Co-authored-by: Takeshi Yoneda <yoneda.takeshi.md@alumni.tsukuba.ac.jp>
@kazukousen
Copy link
Contributor Author

kazukousen commented Oct 24, 2020

with the istiod cpu and memory requests set low, it works.
however, calling webhook "validation.istio.io" failed.
https://app.circleci.com/pipelines/github/weaveworks/flagger/1692/workflows/0edee968-7cd8-45fa-b155-fd7a3bb398cb/jobs/9084/parallel-runs/0/steps/0-111
i found a workaround that sets --set values.global.configValidation=false. is it ok?

@stefanprodan
Copy link
Member

Please update istio in e2e to a version that supports delegation. I guess that’s the reason validation fails.

@kazukousen
Copy link
Contributor Author

kazukousen commented Oct 24, 2020

@stefanprodan
i updated istio and it worked well.
consider in istio 1.7.x is that we need to self-install prometheus, added a patch that.
thanks!

@stefanprodan
Copy link
Member

@kazukousen can you please undo the kustomization change and use https://istio.io/latest/docs/ops/integrations/prometheus/ in e2e tests.

@kazukousen
Copy link
Contributor Author

the failed test test/e2e-istio-tests.sh did not reproduce on my laptop...

pkg/apis/flagger/v1beta1/canary.go Outdated Show resolved Hide resolved
kazukousen and others added 3 commits October 28, 2020 00:31
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 @kazukousen 🏅

@stefanprodan stefanprodan changed the title Support istio's VirtualService delegate Add support for Istio VirtualService delegation Oct 28, 2020
@stefanprodan stefanprodan merged commit a624a29 into fluxcd:master Oct 28, 2020
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.

3 participants