Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ClusterNameToClient sync.Map ClusterNameToIstioClient sync.Map )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // RestConfig given cluster id to get Kubernetes cluster rest config RestConfig(cluster string) (*rest.Config, error) // Cluster given cluster id to get Kubernetes cluster client Cluster(cluster string) (ctrlclient.Client, error) // Istio given cluster id to get Istio client Istio(cluster string) (ctrlclient.Client, error) }
Client facade interface
type ClusterProvider ¶
type ClusterProvider interface { // RestConfig Kubernetes cluster rest config RestConfig(clusterName string) (*rest.Config, error) // Client Kubernetes cluster client with scheme Client(clusterName string, scheme *runtime.Scheme) (ctrlclient.Client, error) }
ClusterProvider retrieve cluster kubeconfig provider interface
type KubeConfigClusterProvider ¶
type KubeConfigClusterProvider struct {
KubeConfigFiles string
}
KubeConfigClusterProvider get kubeconfig files from env var Only for local test
func NewKubeConfigProvider ¶
func NewKubeConfigProvider(kubeconfigFiles string) *KubeConfigClusterProvider
Only for local test
func (*KubeConfigClusterProvider) Client ¶
func (k *KubeConfigClusterProvider) Client(clusterName string, scheme *runtime.Scheme) (ctrlclient.Client, error)
func (*KubeConfigClusterProvider) RestConfig ¶
func (k *KubeConfigClusterProvider) RestConfig(clusterName string) (*rest.Config, error)
type TKEClusterProvider ¶
type TKEClusterProvider struct {
// contains filtered or unexported fields
}
TKEClusterProvider get kubeconfig from tkestack platform api
func NewTKEClusterProvider ¶
func NewTKEClusterProvider(platformClient platformversionedclient.PlatformV1Interface) *TKEClusterProvider
NewTKEClusterProvider
func (*TKEClusterProvider) Client ¶
func (t *TKEClusterProvider) Client(clusterName string, scheme *runtime.Scheme) (ctrlclient.Client, error)
func (*TKEClusterProvider) RestConfig ¶
func (t *TKEClusterProvider) RestConfig(clusterName string) (*rest.Config, error)
Click to show internal directories.
Click to hide internal directories.