launch

package
v1.5.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// PidfilePath
	PidfilePath = "health-endpoint.pid"
)

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 {
	launcher.Launcher
	// contains filtered or unexported fields
}

CiliumHealth is used to wrap the node executable binary.

func (*CiliumHealth) GetStatus

func (ch *CiliumHealth) GetStatus() *models.Status

GetStatus returns the status of the cilium-health daemon.

func (*CiliumHealth) Run

func (ch *CiliumHealth) Run()

Run launches the cilium-health daemon.

type Client

type Client struct {
	*healthPkg.Client
}

Client wraps a client to a specific cilium-health endpoint instance, to provide convenience methods such as PingEndpoint().

func LaunchAsEndpoint

func LaunchAsEndpoint(owner endpoint.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