File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,17 @@ async def post_event(
5353 body = {
5454 'metadata' : {
5555 'namespace' : namespace ,
56- 'generateName' : 'kopf-event-' ,
56+ 'generateName' : settings . posting . event_name_prefix ,
5757 },
5858
5959 'action' : 'Action?' ,
6060 'type' : type ,
6161 'reason' : reason ,
6262 'message' : message ,
6363
64- 'reportingComponent' : 'kopf' ,
65- 'reportingInstance' : 'dev' ,
66- 'source' : {'component' : 'kopf' }, # used in the "From" column in `kubectl describe`.
64+ 'reportingComponent' : settings . posting . reporting_component ,
65+ 'reportingInstance' : settings . posting . reporting_instance ,
66+ 'source' : {'component' : settings . posting . reporting_component }, # used in the "From" column in `kubectl describe`.
6767
6868 'involvedObject' : full_ref ,
6969
Original file line number Diff line number Diff line change @@ -80,6 +80,10 @@ class PostingSettings:
8080 (``kopf.info()``, ``kopf.warn()``, ``kopf.exception()``).
8181 """
8282
83+ reporting_component : str = 'kopf'
84+ reporting_instance : str = 'dev'
85+ event_name_prefix : str = 'kopf-event-'
86+
8387
8488@dataclasses .dataclass
8589class PeeringSettings :
You can’t perform that action at this time.
0 commit comments