kudo icon indicating copy to clipboard operation
kudo copied to clipboard

Add Controller and Webhook Ready Kube Event

Open kensipe opened this issue 5 years ago • 4 comments

Currently the kube events show the manager pod being created...

k get events -n kudo-system
LAST SEEN   TYPE     REASON             OBJECT                                MESSAGE
6s          Normal   Scheduled          pod/kudo-controller-manager-0         Successfully assigned kudo-system/kudo-controller-manager-0 to kind-control-plane
6s          Normal   Pulling            pod/kudo-controller-manager-0         Pulling image "kudobuilder/controller:v0.15.0"
2s          Normal   Pulled             pod/kudo-controller-manager-0         Successfully pulled image "kudobuilder/controller:v0.15.0"
2s          Normal   Created            pod/kudo-controller-manager-0         Created container manager
2s          Normal   Started            pod/kudo-controller-manager-0         Started container manager
6s          Normal   SuccessfulCreate   statefulset/kudo-controller-manager   create Pod kudo-controller-manager-0 in StatefulSet kudo-controller-manager successful

We should have an event which can be watched for webhook etc. ready. this is related to https://github.com/kudobuilder/kudo/issues/1625

kensipe avatar Jul 31 '20 15:07 kensipe

@kensipe what's the use case, just wondering? why using k8s built in readiness + pod states are not enough?

I think the correct solution is to add readiness/liveness check and then correctly assert --wait on pod phase == ready not pod running as it's doing right now (incorrectly).

alenkacz avatar Jul 31 '20 16:07 alenkacz

significant events from the controller should register events... just like pod has pulling, pulled, created, started... the controller should register stages of it's status...

kensipe avatar Jul 31 '20 19:07 kensipe

additionally... --wait when corrected, will be great for cli users and for tests.. but other potentially collaborating services in the cluster will need events... additionally it will add debugging value. when a controller restarts, it will be clear in the events.

kensipe avatar Jul 31 '20 20:07 kensipe

I think the container ready and webhook ready is captured in "pod phases" so it's already exposed by kubernetes. I don't see much value in duplicating those into events as one already has this information on every kubernetes cluster.

I would personally be inclined to close this.

alenkacz avatar Aug 06 '20 07:08 alenkacz