knative / serving

Kubernetes-based, scale-to-zero, request-driven compute
https://knative.dev/docs/serving/
Apache License 2.0
5.58k stars 1.16k forks source link

Remove configurations of inactive revision's services from istio-proxy for memory efficiency #15454

Open eddy-oum opened 3 months ago

eddy-oum commented 3 months ago

Describe the feature

Remove configurations of inactive revision's services from istio-proxy, via istio's exportTo feature.

A revision creates two kubernetes services (rev-00001, rev-00001-private), and both services are discovered by the istio-ingressgateway's istio-proxy in namespace istio-system. Even when the revisions are inactive, and not accepting traffic, istio-proxy still holds the configuration in the memory. This can lead to scaling issues when there are many knative services and inactive revisions in a single cluster.

We can remove the endpoint configuration from istio-proxy by annotating the inactive revision's service with networking.istio.io/exportTo: "no-such-ns" (https://istio.io/latest/docs/ops/configuration/mesh/configuration-scoping/#exportto), and remove the annotation when the revision is active again.

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.