Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // PidfilePath PidfilePath = "health-endpoint.pid" // LaunchTime is the expected time within which the health endpoint // should be able to be successfully run and its BPF program attached. LaunchTime = 30 * time.Second )
Functions ¶
func CleanupEndpoint ¶
func CleanupEndpoint()
CleanupEndpoint cleans up remaining resources associated with the health endpoint.
This is expected to be called after the process is killed and the endpoint is removed from the endpointmanager.
func KillEndpoint ¶
func KillEndpoint()
KillEndpoint attempts to kill any existing cilium-health endpoint if it exists.
This is intended to be invoked in multiple situations:
- The health endpoint has never been run before
- The health endpoint was run during a previous run of the Cilium agent
- The health endpoint crashed during the current run of the Cilium agent and needs to be cleaned up before it is restarted.
Types ¶
type CiliumHealth ¶
type CiliumHealth struct {
// contains filtered or unexported fields
}
CiliumHealth launches and polls the cilium-health daemon
func Launch ¶
func Launch() (*CiliumHealth, error)
Launch starts the cilium-health server and returns a handle to obtain its status
func (*CiliumHealth) GetStatus ¶
func (ch *CiliumHealth) GetStatus() *models.Status
GetStatus returns the status of the cilium-health daemon.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps a client to a specific cilium-health endpoint instance, to provide convenience methods such as PingEndpoint().
func LaunchAsEndpoint ¶
func LaunchAsEndpoint(baseCtx context.Context, owner regeneration.Owner, n *node.Node, mtuConfig mtu.Configuration) (*Client, error)
LaunchAsEndpoint launches the cilium-health agent in a nested network namespace and attaches it to Cilium the same way as any other endpoint, but with special reserved labels.
CleanupEndpoint() must be called before calling LaunchAsEndpoint() to ensure cleanup of prior cilium-health endpoint instances.
func (*Client) PingEndpoint ¶
PingEndpoint attempts to make an API ping request to the local cilium-health endpoint, and returns whether this was successful.