Closed elliotxx closed 1 month ago
Could you plz define the condition of readiness? Since the readiness probe once passed, it indicates that the router is ready to serve.
@JasonHe-WQ Welcome! 👋👋👋
IMO, for karpor syncer
, we should check status of elastic search
(For example, the status should be green or yellow). And for karpor server
, we should check vailability of etcd
. (Correct me if I'm wrong @elliotxx)
It would be ideal if you could factor in scalability for health checks since we may introduce additional dependencies or support other storage in the future.
If you need any help or have any question, please feel free to ping @elliotxx or @ruquanzhao(me).
Could you plz define the condition of readiness? Since the readiness probe once passed, it indicates that the router is ready to serve.
@JasonHe-WQ I have added more details, you can refer to the description above 👆
You can reference healthcheck package.
That package is based on Gin framework🤣 And I would adopt the code to Chi framework first. LOL
You can reference healthcheck package.
That package is based on Gin framework🤣 And I would adopt the code to Chi framework first. LOL
@JasonHe-WQ Yes, I mean that if you don't know how to implement it, you can refer to the practice of this package (it really cannot use Karpor directly), just a reference. You can definitely have your own implementation~ Chi is a great framework, we certainly don't want to use gin anymore.
@JasonHe-WQ Yes, I mean that if you don't know how to implement it, you can refer to the practice of this package (it really cannot use Karpor directly), just a reference. You can definitely have your own implementation~ Chi is a great framework, we certainly don't want to use gin anymore.
However, I still have some questions. And I have sent an email to your email address from git commit, could you kindly plz get contact to me?
@JasonHe-WQ Yes, I mean that if you don't know how to implement it, you can refer to the practice of this package (it really cannot use Karpor directly), just a reference. You can definitely have your own implementation~ Chi is a great framework, we certainly don't want to use gin anymore.
However, I still have some questions. And I have sent an email to your email address from git commit, could you kindly plz get contact to me?
@JasonHe-WQ I have sent a friend request. We can discuss in detail in IM.
@JasonHe-WQ I have added pseudocode for custom component check, which can be referred to below.
What would you like to be added?
Add /livez, /readyz endpoint for service status check.
Expected effect:
Expected
livenessProbe
andreadinessProbe
in Deployment YAML:That is to say, ready will check the health status of each core component of Karpor, and if all pass, the status code will return
200
.All core components of Karpor: Architecture
Ready Conditions:
Server
: Need to check connectivity with ETCD. However, in the future, Karpor may support MySQL as ETCD, so abstraction needs to be done well.Syncer
: It is necessary to ensure that the resource synchronization is working normally. At least check the connectivity withStorage
andLocal clusters
.Storage
: Need to check and store the connectivity of the backend (Currently, onlyElasticSearch
is supported).Pseudocode reference:
You can reference healthcheck package.
Why is this needed?
In order to better monitor the health of services and components.