kmesh-net / kmesh

High Performance ServiceMesh Data Plane Based on Programmable Kernel
https://kmesh.net
Apache License 2.0
361 stars 46 forks source link

There are residuals left in the kmesh ads config after deleting the service #440

Closed lec-bit closed 1 week ago

lec-bit commented 1 week ago

What happened: When I applied a service and then deleted it, there were still some residual configurations left in the kmesh ADS configuration And if I apply another service, it will be cleaned.

What you expected to happen: there should be no residual configurations How to reproduce it (as minimally and precisely as possible):

  1. start kmesh with ads mode : helm install kmesh ./deploy/helm -n kmesh-system --create-namespace
  2. kubectl apply -f service-1.yaml
  3. kubectl delete -f service-1.yaml
  4. curl localhost:15200/debug/config_dump/ads
  5. check clusterConfigs, there is residual configurations left in the kmesh ADS CDS:
    
    "clusterConfigs":  [
      {
        "name":  "outbound|80||fortio-server.default.svc.cluster.local",
        "connectTimeout":  10,
        "lbPolicy":  "LEAST_REQUEST",
        "loadAssignment":  {
          "clusterName":  "outbound|80||fortio-server.default.svc.cluster.local"
        },
        "circuitBreakers":  {
          "maxConnections":  4294967295,
          "maxPendingRequests":  4294967295,
          "maxRequests":  4294967295,
          "maxRetries":  4294967295
        }
      },
6. kubectl apply -f service-2.yaml
7. check clusterConfigs, there is no residual configurations about service-1

service-1.yaml:

apiVersion: v1 kind: Service metadata: labels: app: fortio-server name: fortio-server namespace: default spec: type: ClusterIP ports:

Anything else we need to know?:

Environment: