diff --git a/keps/sig-api-machinery/5452-event-lebel/README.md b/keps/sig-api-machinery/5452-event-lebel/README.md new file mode 100644 index 00000000000..f1001cb353a --- /dev/null +++ b/keps/sig-api-machinery/5452-event-lebel/README.md @@ -0,0 +1,247 @@ +# KEP-5452: Event Support Label + + +- [Release Signoff Checklist](#release-signoff-checklist) +- [Summary](#summary) +- [Motivation](#motivation) + - [Goals](#goals) + - [Non-Goals](#non-goals) +- [Proposal](#proposal) +- [Design Details](#design-details) + - [Request](#request) + - [RBAC](#rbac) + - [Test Plan](#test-plan) + - [Prerequisite testing updates](#prerequisite-testing-updates) + - [Unit tests](#unit-tests) + - [Integration tests](#integration-tests) + - [e2e tests](#e2e-tests) + - [Graduation Criteria](#graduation-criteria) + - [Alpha](#alpha) + - [Beta](#beta) + - [GA](#ga) +- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire) + - [Feature Enablement and Rollback](#feature-enablement-and-rollback) + - [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning) + - [Monitoring Requirements](#monitoring-requirements) + - [Dependencies](#dependencies) + - [Scalability](#scalability) + - [Troubleshooting](#troubleshooting) +- [Implementation History](#implementation-history) +- [Alternatives](#alternatives) + + +## Release Signoff Checklist + +Items marked with (R) are required *prior to targeting to a milestone / release*. + +- [ ] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR) +- [ ] (R) KEP approvers have approved the KEP status as `implementable` +- [ ] (R) Design details are appropriately documented +- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors) + - [ ] e2e Tests for all Beta API Operations (endpoints) + - [ ] (R) Ensure GA e2e tests for meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md) + - [ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free +- [ ] (R) Graduation criteria is in place + - [ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md) +- [ ] (R) Production readiness review completed +- [ ] (R) Production readiness review approved +- [ ] "Implementation History" section is up-to-date for milestone +- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io] +- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes + + + +[kubernetes.io]: https://kubernetes.io/ +[kubernetes/enhancements]: https://git.k8s.io/enhancements +[kubernetes/kubernetes]: https://git.k8s.io/kubernetes +[kubernetes/website]: https://git.k8s.io/website + +## Summary +- https://github.com/kubernetes/kubernetes/blob/d5b2a0438dc685db5222a66291d6100745a58101/staging/src/k8s.io/client-go/tools/record/event.go#L93 +The current EventRecorder interface only abstracts the interface for setting annotations, but does not abstract the interface for setting labels. + + + +## Motivation + +Our scenario is similar to the spanid and traceid in distributed tracing. +This way, a batch of events can be selected through the label, and then grouped. + +### Goals + +- Supports setting the label when creating an event + +### Non-Goals + +## Proposal + +- Add a new function abstraction to the EventRecorder interface + ```LabeledAnnotatedEventf(object runtime.Object, labels, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) ``` + + +NOTE: When an external project references this interface, the corresponding implementation needs to add the LabeledAnnotatedEventf function. + + +### Test Plan + +[x] I/we understand the owners of the involved components may require updates to +existing tests to make this code solid enough prior to committing the changes necessary +to implement this enhancement. + +##### Prerequisite testing updates + +##### Unit tests + + + + + + +##### Integration tests + + + +##### e2e tests + + + + +### Graduation Criteria + +## Production Readiness Review Questionnaire + +### Feature Enablement and Rollback + +###### How can this feature be enabled / disabled in a live cluster? + +- It does not affect the existing program. Even if the versions are different, it doesn't matter. + +###### Does enabling the feature change any default behavior? + +It only adds new behavior and does not affect other pars of the Kubernetes. + +###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)? + +No. + +###### What happens if we reenable the feature if it was previously rolled back? + +When using the new function, a panic will occur. + +###### Are there any tests for feature enablement/disablement? + +Does not require special testing frameworks. + +### Rollout, Upgrade and Rollback Planning + +###### How can a rollout or rollback fail? Can it impact already running workloads? + +Enabling the feature does not affect any workloads. + +###### What specific metrics should inform a rollback? + +Specific metrics are not required for the monitoring of this feature. + +###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested? + + + +###### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.? + +No. + +### Monitoring Requirements + +###### How can an operator determine if the feature is in use by workloads? + + +###### How can someone using this feature know that it is working for their instance? + + +###### What are the reasonable SLOs (Service Level Objectives) for the enhancement? + +No. + +### Scalability + +###### Will enabling / using this feature result in any new API calls? + +No. + +###### Will enabling / using this feature result in introducing new API types? + +No. + +###### Will enabling / using this feature result in any new calls to the cloud provider? + +No. + +###### Will enabling / using this feature result in increasing size or count of the existing API objects? + +No. + +###### Will enabling / using this feature result in increasing time taken by any operations covered by existing SLIs/SLOs? + +No. + +###### Will enabling / using this feature result in non-negligible increase of resource usage (CPU, RAM, disk, IO, ...) in any components? + +No. + +### Troubleshooting + +###### How does this feature react if the API server and/or etcd is unavailable? + + +###### What are other known failure modes? + + +###### What steps should be taken if SLOs are not being met to determine the problem? + +No steps required. + +## Implementation History + + + +## Alternatives diff --git a/keps/sig-api-machinery/5452-event-lebel/kep.yaml b/keps/sig-api-machinery/5452-event-lebel/kep.yaml new file mode 100644 index 00000000000..ac665360cd5 --- /dev/null +++ b/keps/sig-api-machinery/5452-event-lebel/kep.yaml @@ -0,0 +1,23 @@ +title: Event Support Label +kep-number: 5452 +authors: + - "@ls-2018" +owning-sig: sig-api-machinery +status: implementable +creation-date: 2025-07-16 + +# The target maturity stage in the current dev cycle for this KEP. +# If the purpose of this KEP is to deprecate a user-visible feature +# and a Deprecated feature gates are added, they should be deprecated|disabled|removed. +stage: alpha + +# The most recent milestone for which work toward delivery of this KEP has been +# done. This can be the current (upcoming) milestone, if it is being actively +# worked on. +latest-milestone: "v1.34" + +# The milestone at which this feature was, or is targeted to be, at each stage. +milestone: + alpha: "v1.34" + +disable-supported: true \ No newline at end of file