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

Surface POST /config errors as Kubernetes events #3205

Closed
1 of 2 tasks
mflendrich opened this issue Dec 1, 2022 · 1 comment
Closed
1 of 2 tasks

Surface POST /config errors as Kubernetes events #3205

mflendrich opened this issue Dec 1, 2022 · 1 comment
Assignees
Milestone

Comments

@mflendrich
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Problem Statement

If Kong rejects an entity (route, service, etc) during POST /config, link the error message to the culprit Kubernetes resource by emitting a Kubernetes Event associated with it.

This is similar to #3097. #3097 created Kubernetes events for failures in the translate phase. This issue is about creating similar events for entities that were discarded by db-less Kong during a POST /config.

Proposed Solution

  • Expect that Kong enhances the POST /config HTTP 400 response (in the event of validation failure of some entities in the request) with objects uniquely identifying the entity that failed validation (currently, ordering of errors in the response body is not reliable)
  • Implement a mechanism in KIC that links the error message from the POST /config HTTP 400 response to a Kubernetes object
  • Emit a Kubernetes event (similarly to what Create warning Events when k8s objects translation fails #3097 did) in that event

Additional information

Out of scope: doing the same thing (emitting events for rejected resources) for the DB mode. This requires implementing the backpropagation of errors in decK.

Acceptance Criteria

  • When Kong (in DB-less mode) rejects an entity during POST /config, a Kubernetes Event is created on the resource that is the reason for rejection.
@rainest
Copy link
Contributor

rainest commented Feb 17, 2023

Closed by #3446

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

No branches or pull requests

2 participants