k8sclient

package
v2.21.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanI

func CanI(ctx context.Context, ra *v1.ResourceAttributes) (bool, error)

func CanPortForward

func CanPortForward(ctx context.Context, namespace string) bool

CanPortForward answers the question if this client has the RBAC permissions necessary to perform a port-forward to the connected namespace.

func CanWatchNamespaces

func CanWatchNamespaces(ctx context.Context) bool

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 ConnectToAgent

func ConnectToAgent(
	ctx context.Context,
	podName, namespace string,
	port uint16,
) (*grpc.ClientConn, agent.AgentClient, *manager.VersionInfo2, error)

func GetK8sConfig added in v2.21.0

func GetK8sConfig(ctx context.Context) *rest.Config

func WithK8sConfig added in v2.21.0

func WithK8sConfig(ctx context.Context, k8sConfig *rest.Config) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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