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
I am trying the figure a way for doing health check (liveness and readiness) for controller manager created using either kubebuilder or operator-sdk. The health check result should be determined by health check result of each controller. Therefore, there should be a way to notify manager from controller by adding a function inside manager interface. (basically, Observer pattern) https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/manager/manager.go#L56
So, each controller can call mgr.Update() to notify manager.
We do have a bug to track health and liveness support, it was just not quite titled correctly. I'm going to close this as a duplicate. Please weigh in on the other bug: #297
@DirectXMan12 I ask this just to make sure. Does "Closed" status of this ticket mean the following code snippet will not respond, when any problems happen within the controller? Any problem can be a hanging reconciliation, an internal issue in kubebuilder framework, etc.
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
setupLog.Error(err, "unable to set up health check")
os.Exit(1)
}
I am trying the figure a way for doing health check (liveness and readiness) for controller manager created using either kubebuilder or operator-sdk. The health check result should be determined by health check result of each controller. Therefore, there should be a way to notify manager from controller by adding a function inside manager interface. (basically, Observer pattern)
https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/manager/manager.go#L56
So, each controller can call mgr.Update() to notify manager.
The other approach is to use channel but currently only stop channel is available.
https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/manager/internal.go#L227
The text was updated successfully, but these errors were encountered: