You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kopf is creating way more Event objects than my Kubernetes cluster's administrators would like, potentially leading to etcd performance problems.
This is slightly related to #117, as merging similar events would probably help. But in my case, I simply would like to not have any Events of Type=Normal published. The Kopf documentation (Configure logging events) says that is possible, but it seems that following that documentation doesn't change anything in how Kopf behaves.
Expected Behavior
With kopf.EventsConfig.events_loglevel == kopf.config.LOGLEVEL_WARNING (documented here), I understand that no Type=Normal events should be published on Kubernetes resources watched by Kopf cause handlers.
With the steps provided below, I would expect the Events section of kubectl describe pod to contain only:
Warning Logging 119s kopf warn 30
Actual Behavior
With the steps provided below, I observe that the Events section of kubectl describe pod contains:
Warning Logging 119s kopf warn 30
Normal Logging 119s kopf Handler 'handle' succeeded.
Normal Logging 119s kopf info 30
Normal Logging 119s kopf All handlers succeeded for creation.
Steps to Reproduce the Problem
Using kind to get a playground Kubernetes cluster:
bash$ kind create cluster --name demo
bash$ export KUBECONFIG="$(kind get kubeconfig-path --name="demo")"
bash$ docker build -t demo-image . (using the Dockerfile included below, along with handlers.py)
Warning Logging 119s kopf warn 30
Normal Logging 119s kopf Handler 'handle' succeeded.
Normal Logging 119s kopf info 30
Normal Logging 119s kopf All handlers succeeded for creation.
Dockerfile
FROM python:3.7-slim
RUN pip install kopf
ENV PYTHONPATH=/src
ADD handlers.py ${PYTHONPATH}/handlers.py
ENTRYPOINT ["kopf", "run", "-m", "handlers", "--standalone"]
kopf-archiverbot
changed the title
[archival placeholder]
Setting kopf.EventsConfig.events_loglevel doesn't prevent Type=Normal Events to be posted
Aug 19, 2020
Kopf is creating way more Event objects than my Kubernetes cluster's administrators would like, potentially leading to etcd performance problems.
This is slightly related to #117, as merging similar events would probably help. But in my case, I simply would like to not have any Events of
Type=Normal
published. The Kopf documentation (Configure logging events) says that is possible, but it seems that following that documentation doesn't change anything in how Kopf behaves.Expected Behavior
With
kopf.EventsConfig.events_loglevel == kopf.config.LOGLEVEL_WARNING
(documented here), I understand that noType=Normal
events should be published on Kubernetes resources watched by Kopf cause handlers.With the steps provided below, I would expect the Events section of
kubectl describe pod
to contain only:Actual Behavior
With the steps provided below, I observe that the Events section of
kubectl describe pod
contains:Steps to Reproduce the Problem
Using kind to get a playground Kubernetes cluster:
bash$ kind create cluster --name demo
bash$ export KUBECONFIG="$(kind get kubeconfig-path --name="demo")"
bash$ docker build -t demo-image .
(using theDockerfile
included below, along withhandlers.py
)bash$ kind load docker-image --name demo demo-image
bash$ kubectl apply -f operator-deployment.yaml
bash$ kubectl describe pod
Observe in the Events section:
Dockerfile
handlers.py
operator-deployment.yaml
Specifications
v1.14.2
Python 3.7.4
thilp Can you please try it with
kopf==0.22rc1
? Should be fixed now (I've tested with one of the examples.)Thank you, it works perfectly now! Please keep making Kopf amazing.
The text was updated successfully, but these errors were encountered: