k8s

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DaemonSet   = "DaemonSet"
	Deployment  = "Deployment"
	Namespace   = "Namespace"
	Pod         = "Pod"
	ReplicaSet  = "ReplicaSet"
	StatefulSet = "StatefulSet"

	// AgentNamespace is the namespace where the Buoyant Cloud agent is installed.
	AgentNamespace = "buoyant-cloud"
	// AgentIDKey is the key for the agent id in the agent metadata config map
	AgentIDKey = "agent_id"
	// AgentNameKey is the key for the agent name in the agent metadata config map
	AgentNameKey = "agent_name"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(sharedInformers informers.SharedInformerFactory, k8sClient *l5dk8s.KubernetesAPI, l5dClient l5dApi.Interface, tsClient tsclient.Interface, local bool) *Client

func (*Client) DSToWorkload

func (c *Client) DSToWorkload(ds *appsv1.DaemonSet) *pb.Workload

DSToWorkload serializes a k8s DaemonSet object and wraps it in a bcloud API proto message.

func (*Client) DeployToWorkload

func (c *Client) DeployToWorkload(deploy *appsv1.Deployment) *pb.Workload

DeployToWorkload serializes a k8s Deployment object and wraps it in a bcloud API proto message.

func (*Client) EventToPB

func (c *Client) EventToPB(event *v1.Event) (*pb.Event, error)

EventToPB converts a Kubernetes event to a bcloud protobuf event. If the owner of the event is not a DeamonSet, Deployment, or StatefulSet, return a nil event without error.

func (*Client) GetAuthorizationPolicies added in v0.8.1

func (c *Client) GetAuthorizationPolicies(ctx context.Context) ([]*pb.AuthorizationPolicy, error)

func (*Client) GetControlPlaneCerts added in v0.2.0

func (c *Client) GetControlPlaneCerts(ctx context.Context) (*pb.ControlPlaneCerts, error)

func (*Client) GetK8sServiceManifest added in v0.4.1

func (c *Client) GetK8sServiceManifest(ctx context.Context) (*pb.Service, error)

GetK8sServiceManifest the manifest of the kubernetes service residing in the default namespace

func (*Client) GetLinkerdConfigMap added in v0.4.1

func (c *Client) GetLinkerdConfigMap(ctx context.Context) (*pb.ConfigMap, error)

GetLinkerdConfigMap retrieves Linkerd config map

func (*Client) GetMeshTLSAuthentications added in v0.8.1

func (c *Client) GetMeshTLSAuthentications(ctx context.Context) ([]*pb.MeshTLSAuthentication, error)
func (c *Client) GetMulticlusterLinks(ctx context.Context) ([]*pb.MulticlusterLink, error)

func (*Client) GetNetworkAuthentications added in v0.8.1

func (c *Client) GetNetworkAuthentications(ctx context.Context) ([]*pb.NetworkAuthentication, error)

func (*Client) GetNodeManifests added in v0.4.1

func (c *Client) GetNodeManifests(ctx context.Context) ([]*pb.Node, error)

GetNodeManifests retrieves all nodes in the cluster

func (*Client) GetPodSpec added in v0.4.1

func (c *Client) GetPodSpec(ctx context.Context, podName, namespace string) (*pb.Pod, error)

GetPodSpec retrieves pod manifest

func (*Client) GetPrometheusScrape added in v0.4.1

func (c *Client) GetPrometheusScrape(ctx context.Context, podName, namespace string) ([][]byte, error)

GetPrometheusScrape retrieves the raw prom scrape from the proxy of a pod

func (*Client) GetProxyLogs added in v0.4.1

func (c *Client) GetProxyLogs(ctx context.Context, podName, namespace string, includeTimestamps bool, tailLines *int64) ([]byte, error)

GetProxyLogs retrieves the proxy logs of a pod

func (*Client) GetServerAuths added in v0.5.0

func (c *Client) GetServerAuths(ctx context.Context) ([]*pb.ServerAuthorization, error)

func (*Client) GetServers added in v0.5.0

func (c *Client) GetServers(ctx context.Context) ([]*pb.Server, error)

func (*Client) GetServiceProfiles added in v0.5.0

func (c *Client) GetServiceProfiles(ctx context.Context) ([]*pb.ServiceProfile, error)

func (*Client) GetTrafficSplits added in v0.5.0

func (c *Client) GetTrafficSplits(ctx context.Context) ([]*pb.TrafficSplit, error)

func (*Client) ListWorkloads

func (c *Client) ListWorkloads() ([]*pb.Workload, error)

func (*Client) STSToWorkload

func (c *Client) STSToWorkload(sts *appsv1.StatefulSet) *pb.Workload

STSToWorkload serializes a k8s StatefulSet object and wraps it in a bcloud API proto message.

func (*Client) Sync

func (c *Client) Sync(stopCh <-chan struct{}, timeout time.Duration) error

Jump to

Keyboard shortcuts

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