apiserver

package
v1.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetNode returns the node object for the given node name
	GetNode(ctx context.Context, nodeName string) (*v1.Node, error)

	// GetPod returns the pod object for the given pod name and namespace
	GetPod(ctx context.Context, namespace, podName string) (*v1.Pod, error)

	// ValidateToken queries k8s token review API and returns information about the given token
	ValidateToken(ctx context.Context, token string, audiences []string) (*authv1.TokenReviewStatus, error)
}

Client is a client for querying k8s API server

func New

func New(kubeConfigFilePath string) Client

New creates a new Client. There are two cases: - If a kubeConfigFilePath is provided, config is taken from that file -> use for clients running out of a k8s cluster - If not (empty kubeConfigFilePath), InClusterConfig is used -> use for clients running in a k8s cluster

Jump to

Keyboard shortcuts

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