kubeclient

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Profile = "kubeclient"
)
View Source
const (
	Subject = "subject"
)

Variables

View Source
var (
	ErrNilKubeClient = errors.New("kube client is nil, please check if API Server is available")
)

Functions

func KubeClient

func KubeClient(scheme *runtime.Scheme, cfg *rest.Config) (k8sClient client.Client, err error)

KubeClient new kube client

func RuntimeKubeClient added in v1.1.1

func RuntimeKubeClient(scheme *runtime.Scheme, token *oidc.Token, useToken bool, properties *Properties) (cli client.Client, err error)

RuntimeKubeClient new runtime kube client

Types

type Client

type Client struct {
	client.Client
}

Client is the encapsulation of the default kube client

type ImpersonateClient added in v1.1.1

type ImpersonateClient struct {
	at.ContextAware

	client.Client

	Context context.Context `json:"context"`
}

ImpersonateClient is the client impersonate kube client

type KubeRuntimeClients added in v1.1.7

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

func (*KubeRuntimeClients) Get added in v1.1.7

func (c *KubeRuntimeClients) Get(uid string) (client client.Client, ok bool)

func (*KubeRuntimeClients) Set added in v1.1.7

func (c *KubeRuntimeClients) Set(uid string, client client.Client)

type Properties added in v1.1.2

type Properties struct {
	at.ConfigurationProperties `value:"kubeclient"`
	at.AutoWired

	// use DefaultInCluster as default
	DefaultInCluster *bool `json:"defaultInCluster"`

	//OIDC Scope Impersonate
	OIDCScope string `json:"oidcScope"`

	QPS float32 `json:"qps"`

	// Maximum burst for throttle.
	// If it's zero, the created RESTClient will use DefaultBurst: 10.
	Burst int `json:"burst"`

	// The maximum length of time to wait before giving up on a server request. A value of zero means no timeout.
	Timeout time.Duration `json:"timeout"`
}

Properties the operator properties

type RuntimeClient added in v1.1.2

type RuntimeClient struct {
	at.ContextAware

	client.Client

	Context context.Context `json:"context"`
}

RuntimeClient is the client the runtime kube client

type TokenizeClient added in v1.1.1

type TokenizeClient struct {
	at.ContextAware

	client.Client

	Context context.Context `json:"context"`
}

TokenizeClient is the client tokenize kube client

Jump to

Keyboard shortcuts

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