launch

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 added in v1.6.0

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 {
	*probe.Client
}

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

func (c *Client) PingEndpoint() error

PingEndpoint attempts to make an API ping request to the local cilium-health endpoint, and returns whether this was successful.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL