Documentation
¶
Overview ¶
Package kubeclient implement the kube client for the applications that use the API Server of kubernetes
Index ¶
- Constants
- func GetClusterConfig(clusterName string, token *oidc.Token, prop *Properties) (clusterConfig *kubeconfig.ClusterConfig)
- func NewKubeClient(scheme *runtime.Scheme, cfg *RestConfig) (k8sClient client.Client, err error)
- func NewRuntimeKubeClient(scheme *runtime.Scheme, token *oidc.Token, useToken bool, ...) (cli client.Client, err error)
- type Client
- type ClientCreation
- type Properties
- type RestConfig
- type RuntimeClient
- type RuntimeClientCreation
Constants ¶
View Source
const (
Profile = "kubeclient"
)
View Source
const (
Subject = "subject"
)
Variables ¶
This section is empty.
Functions ¶
func GetClusterConfig ¶ added in v1.2.0
func GetClusterConfig(clusterName string, token *oidc.Token, prop *Properties) (clusterConfig *kubeconfig.ClusterConfig)
func NewKubeClient ¶ added in v1.2.0
NewKubeClient new kube client
func NewRuntimeKubeClient ¶ added in v1.2.0
func NewRuntimeKubeClient(scheme *runtime.Scheme, token *oidc.Token, useToken bool, properties *Properties, cluster *kubeconfig.ClusterConfig) (cli client.Client, err error)
NewRuntimeKubeClient new runtime kube client
Types ¶
type ClientCreation ¶ added in v1.2.0
ClientCreation is the encapsulation of the default kube client
type Properties ¶ added in v1.1.2
type Properties struct {
at.ConfigurationProperties `value:"kubeclient"`
at.AutoWired
// operator deployment namespace
Namespace string `json:"namespace" default:"kube-system"`
// use DefaultInCluster as default
// Deprecated
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"`
// Use default cluster selector
DefaultClusterSelector bool `json:"defaultClusterSelector"`
// the default kube config in base64
Clusters map[string]kubeconfig.ClusterInfo `json:"clusters"`
}
Properties the operator properties
type RestConfig ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.