k8s

package
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	*client.Kubeconfig
	MappedNamespaces []string
	// contains filtered or unexported fields
}

Cluster is a Kubernetes cluster reference.

func ConnectCluster added in v2.13.0

func ConnectCluster(c context.Context, cr *rpc.ConnectRequest, config *client.Kubeconfig) (*Cluster, error)

func NewCluster

func NewCluster(c context.Context, kubeFlags *client.Kubeconfig, namespaces []string) (*Cluster, error)

func (*Cluster) ActualNamespace

func (kc *Cluster) ActualNamespace(namespace string) string

func (*Cluster) AddNamespaceListener

func (kc *Cluster) AddNamespaceListener(c context.Context, nsListener userd.NamespaceListener)

func (*Cluster) GetClusterId

func (kc *Cluster) GetClusterId(ctx context.Context) string

func (*Cluster) GetCurrentNamespaces

func (kc *Cluster) GetCurrentNamespaces(forClientAccess bool) []string

GetCurrentNamespaces returns the names of the namespaces that this client is mapping. If the forClientAccess is true, then the namespaces are restricted to those where an intercept can take place, i.e. the namespaces where this client can Watch and get services and deployments.

func (*Cluster) GetManagerInstallId added in v2.18.0

func (kc *Cluster) GetManagerInstallId(ctx context.Context) string

func (*Cluster) SetMappedNamespaces

func (kc *Cluster) SetMappedNamespaces(c context.Context, namespaces []string) bool

func (*Cluster) StartNamespaceWatcher added in v2.13.0

func (kc *Cluster) StartNamespaceWatcher(ctx context.Context)

StartNamespaceWatcher runs a Kubernetes Watcher that provide information about the cluster's namespaces'. The function waits for the first snapshot to arrive before returning.

func (*Cluster) WithK8sInterface

func (kc *Cluster) WithK8sInterface(c context.Context) context.Context

Jump to

Keyboard shortcuts

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