Documentation ¶
Index ¶
- type Cluster
- func (kc *Cluster) ActualNamespace(namespace string) string
- func (kc *Cluster) AddNamespaceListener(c context.Context, nsListener userd.NamespaceListener)
- func (kc *Cluster) CanWatchNamespaces(ctx context.Context) bool
- func (kc *Cluster) GetClusterId(ctx context.Context) string
- func (kc *Cluster) GetCurrentNamespaces(forClientAccess bool) []string
- func (kc *Cluster) SetMappedNamespaces(c context.Context, namespaces []string) bool
- func (kc *Cluster) StartNamespaceWatcher(ctx context.Context)
- func (kc *Cluster) WithK8sInterface(c context.Context) context.Context
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 (*Cluster) ActualNamespace ¶
func (*Cluster) AddNamespaceListener ¶
func (kc *Cluster) AddNamespaceListener(c context.Context, nsListener userd.NamespaceListener)
func (*Cluster) CanWatchNamespaces ¶ added in v2.13.0
CanWatchNamespaces answers the question if this client has the RBAC permissions necessary to watch namespaces. The answer is likely false when using a namespaces scoped installation.
func (*Cluster) GetCurrentNamespaces ¶
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) SetMappedNamespaces ¶
func (*Cluster) StartNamespaceWatcher ¶ added in v2.13.0
nsWatcher runs a Kubernetes Watcher that provide information about the cluster's namespaces'.
A filtered list of namespaces is used for creating a DNS search path which is propagated to the DNS-resolver in the root daemon each time an update arrives.
The first update will close the firstSnapshotArrived channel.