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

Expose debug endpoints allowing inspection of the fallback configuration #5932

Closed
3 tasks
Tracked by #5854
czeslavo opened this issue Apr 25, 2024 · 2 comments · Fixed by #6159
Closed
3 tasks
Tracked by #5854

Expose debug endpoints allowing inspection of the fallback configuration #5932

czeslavo opened this issue Apr 25, 2024 · 2 comments · Fixed by #6159
Assignees
Labels
release/required it is required that this be resolved before releasing
Milestone

Comments

@czeslavo
Copy link
Contributor

czeslavo commented Apr 25, 2024

Make sure that /debug/config endpoints allowing inspection of the generated fallback configuration exist.

Proposed solution

/debug/config/problems endpoint should return responses including the following data.

When objects were only excluded

{
    "brokenObjects": [
        {"kind": "KongPlugin", "name": "key-auth", "namespace": "default"}, 
        {"kind": "HTTPRoute", "name": "route-b", "namespace": "default"}
    ],
    "excludedObjects": [
        {"kind": "KongPlugin", "name": "key-auth", "namespace": "default"}, 
        {"kind": "HTTPRoute", "name": "route-b", "namespace": "default"}
    ]
    "backfilledObjects": []
}

When objects were excluded and then backfilled

{
    "brokenObjects": [
        {"kind": "KongPlugin", "name": "key-auth", "namespace": "default"}, 
        {"kind": "HTTPRoute", "name": "route-b", "namespace": "default"}
    ]
    "excludedObjects": [
        {"kind": "KongPlugin", "name": "key-auth", "namespace": "default"}, 
        {"kind": "HTTPRoute", "name": "route-b", "namespace": "default"}
    ],
    "backfilledObjects": [
        {"kind": "HTTPRoute", "name": "route-b", "namespace": "default"}
    ]
}

When a regular config push succeeded (no fallback configuration was involved)

{
    "brokenObjects": [],
    "excludedObjects": [],
    "backfilledObjects": []
}

Acceptance criteria:

  • Users can list all broken objects (the ones that were rejected by the Gateway)
  • Users can list all excluded objects (the ones that were excluded in the fallback configuration)
  • Users can list all backfilled objects (the ones that were backfilled in the fallback configuration)
@czeslavo czeslavo assigned czeslavo and unassigned czeslavo Apr 25, 2024
@czeslavo czeslavo added this to the KIC v3.2.x milestone Apr 25, 2024
@czeslavo czeslavo added the release/required it is required that this be resolved before releasing label Apr 25, 2024
@rainest rainest self-assigned this May 24, 2024
@czeslavo
Copy link
Contributor Author

@rainest Let's see if we can solve #4473 along with this.

@czeslavo
Copy link
Contributor Author

czeslavo commented Jun 5, 2024

@rainest I noticed that /debug/config/problems always returns an empty slice of broken objects and no hash, even if the fallback configuration generation is triggered. This can be verified following the steps from the guide. Not creating a separate issue as I believe we should handle it under this one.

I updated the issue with the proposed content of the responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/required it is required that this be resolved before releasing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants