-
Notifications
You must be signed in to change notification settings - Fork 596
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
Create warning Events when k8s objects translation fails #3097
Comments
This was referenced Oct 26, 2022
czeslavo
added a commit
that referenced
this issue
Oct 27, 2022
…with unit tests (#3110) Introduces utility types that are going to be used for collecting failures that happen during the translation process.
czeslavo
added a commit
that referenced
this issue
Oct 27, 2022
…with unit tests (#3110) Introduces utility types that are going to be used for collecting failures that happen during the translation process.
This was referenced Oct 27, 2022
czeslavo
added a commit
that referenced
this issue
Oct 28, 2022
It adds TranslationFailureCollector to the Parser. Build method is modified so that translation failures are returned from it. KongClient inspects the failures and in case any occurred, reports TranslationCount metric with SuccessKey=SuccessFalse.
This was referenced Oct 28, 2022
czeslavo
added a commit
that referenced
this issue
Nov 3, 2022
…#3125) It starts creating Kubernetes Events for all TranslationFailures detected during the translation phase. It will create one event per causing object. An integration test suite is also added in order to track all translation failure cases - which should make eventual future refactors safer (e.g. moving validation rules from the parser to the controllers).
This was referenced Nov 4, 2022
Merged
czeslavo
added a commit
that referenced
this issue
Nov 7, 2022
…ing in grouped services (#3130) Adds propagation of translation failure: annotations not matching in services backing a single route.
1 task
czeslavo
added a commit
that referenced
this issue
Nov 7, 2022
czeslavo
added a commit
that referenced
this issue
Nov 7, 2022
…erred client-cert (#3137) Propagates translation failures for services for which the referred client-cert cannot be fetched.
This was referenced Nov 8, 2022
czeslavo
added a commit
that referenced
this issue
Nov 9, 2022
1 task
czeslavo
added a commit
that referenced
this issue
Nov 9, 2022
…erred secrets (#3147) Adds propagation of translation failures for Gateway.Listeners that: - specify more than one certReference, - refer to a secret that has no valid TLS key-pair embedded.
czeslavo
added a commit
that referenced
this issue
Nov 15, 2022
4 tasks
czeslavo
added a commit
that referenced
this issue
Nov 16, 2022
…g backend refs (#3167) Adds propagation of translation failures for HTTPRoute not having any backendRef specified.
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Problem Statement
The parser is designed so that if it detects an issue with translating a Kubernetes object (a validation error is detected), it can skip a given object in a resulting KongState. Currently, it does so for a couple of objects, examples of such validation errors are:
In order to make the errors' details visible to the users in a more structured format than just error logs, we would like to introduce warning
KongConfigurationTranslationFailed
Events.Proposed Solution
Create a corev1.Event with a type
Warning
and a reasonKongConfigurationTranslationFailed
when a validation error occurs. Every event should have an involved object reference, a reason (meant to be a computer-friendly slug), and a message (meant to be a human-friendly description of the reason). By specifying an involved object, we make the event visible to a userkubectl describe
-ing the affected resource orkubectl get
-ting all the events (potentially filtering them by the reason we introduce).Suggested split of code changes
[]TranslationFailure
to producecorev1.Events
(feat(#3097): create warning translation failure events for CA secrets #3125)Additional information
PoC: #3088
Acceptance Criteria
corev1.Event
is created with theKongConfigurationTranslationFailed
reason and a detailed human-readable message describing the reason.KongConfigurationTranslationFailed
is associated with all objects that may be affected by the translation error (e.g. faulty CA certificate affecting a KongPlugin)[1] a validation error is considered to be any code branch in the parsing routines under
internal/dataplane/parser
that ends up with acontinue
statement and an error log.The text was updated successfully, but these errors were encountered: