-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[TEP-0137] Add events config map #6883
Conversation
f586d36
to
b3ec85b
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
b3ec85b
to
1caa5e0
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
pkg/apis/config/events.go
Outdated
) | ||
|
||
var ( | ||
// Note(afrittoli): only one valid format for now, more to come |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you link an issue as the TODO here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
type EventFormat string | ||
|
||
// EventFormats is a set of event formats | ||
type EventFormats map[EventFormat]struct{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could https://pkg.go.dev/k8s.io/[email protected]/pkg/util/sets#Set be used here? It looks like the main thing missing is just a string representation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'm pretty sure we could use that.
Since I use very little of the Set
functionality I thought it was not needed, but it would at least save me the need for the Equals
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried a bit, but go stuck trying to wrap my own type around the Set
.
I've check Set
implementation and it's a map[T]Empty
where Empty
is struct{}
- so identically to what I have except for the "generics" bit, which is not needed here, so I think I'll stick to the current implementation this time.
``` | ||
|
||
The sink used to be configured in the `config-defaults` config map. | ||
This option is still available, but deprecated, and will be removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add this to the deprecations table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitely will. I was a bit put off by the fact that I need to put things like date and release number in there, but I can start with a basic entry and update it once things are merged and released
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - deprecating a config parameter in favour of a new one that provides the same functionality is not really covered (or in the scope of) the API compatibility policy. Since the config option has been around for a while and there's no real extra maintenance burden in keeping it around, I marked it for removal in 9 months
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can merge once Lee's comments are addressed
Add a new "events" config map. The config map supersedes the cloudevent settings from the "defaults" config map. The current settings is deprecated but still honoured, so the change is transparent for existing users. They shall migrate to the new settings before the old one is removed. This change is in preparation for TEP-0137, where new format of events will be introduced, and configured via the new events configuration map. The current config map is only read from within the events package, so the change to the logic is localised there, it only propagates into tests. Signed-off-by: Andrea Frittoli <[email protected]>
1caa5e0
to
8950ade
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lbernick, vdemeester, Yongxuanzhang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
Add a new "events" config map. The config map supersedes the cloudevent settings from the "defaults" config map. The current settings is deprecated but still honoured, so the change is transparent for existing users. They shall migrate to the new settings before the old one is removed.
This change is in preparation for TEP-0137, where new format of events will be introduced, and configured via the new events configuration map.
The current config map is only read from within the events package, so the change to the logic is localised there, it only propagates into tests.
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes
/kind feature