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 admin endpoints to introspect proxy config #394

Closed
iffyio opened this issue Sep 9, 2021 · 2 comments · Fixed by #396
Closed

Add admin endpoints to introspect proxy config #394

iffyio opened this issue Sep 9, 2021 · 2 comments · Fixed by #396
Assignees
Labels
area/operations Installation, updating, metrics etc

Comments

@iffyio
Copy link
Collaborator

iffyio commented Sep 9, 2021

It would be very useful for operations to be able to be able to view the current config that a proxy is running at a given point in time.

Let's add two admin endpoints /clusters and /filterchain that returns a simplified JSON of the current cluster and filterchain respectively back to the caller. e.g:

$ curl quilkin:8080/clusters
[{
  "name": "default-cluster",
  "endpoints": [{
    "address": {
      "socketAddress": {
          "address": "127.0.0.1",
          "portValue": 1234
      }
    }
  }]
]}
$ curl quilkin:8080/filterchain
{
  "filters": [{
    {
      "name": "quilkin.extensions.filters.debug.v1alpha1.Debug",
      "config": {
        id: "hello"
      }  
    }  
  }]
}
@iffyio iffyio added the area/operations Installation, updating, metrics etc label Sep 9, 2021
@markmandel
Copy link
Contributor

+1 on this! I think this is an excellent idea.

I know envoy also has a /config_dump option which gives back basically everything. Does it make more sense to start there and provide all the info, than each of the different filter options, like /filterchain ?

@iffyio
Copy link
Collaborator Author

iffyio commented Sep 10, 2021

That makes sense, alright the endpoint becomes /config_dump instead and would return something like:

$ curl quilkin:8080/config_dump
{
  "clusters": [{
    "name": "default-cluster",
    "endpoints": [{
        "address": "127.0.0.1",
        "port": 1234
    }]
  }],
  "filterchain": {
    "filters": [{
      {
        "name": "quilkin.extensions.filters.debug.v1alpha1.Debug",
        "config": {
          id: "hello"
        }  
      }  
    }]
  }
}

@iffyio iffyio self-assigned this Sep 12, 2021
iffyio added a commit that referenced this issue Sep 14, 2021
That returns a JSON of the current config the proxy is running with

This includes a breaking change, as the FilterFactory to now needs to return
the config in addition to the filter it created.

Resolves #394
iffyio added a commit that referenced this issue Sep 20, 2021
* Add a /config_dump endpoint

That returns a JSON of the current config the proxy is running with

This includes a breaking change, as the FilterFactory to now needs to return
the config in addition to the filter it created.

Resolves #394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operations Installation, updating, metrics etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants