Documentation ¶
Index ¶
- func APIServerLocation(ctx context.Context, platformClient tkeinternalclient.PlatformInterface) (*url.URL, http.RoundTripper, string, error)
- func APIServerLocationByCluster(ctx context.Context, cluster *platform.Cluster, ...) (*url.URL, http.RoundTripper, string, error)
- func BuildClientSet(cluster *platform.Cluster, credential *platform.ClusterCredential) (*kubernetes.Clientset, error)
- func BuildExternalClientSet(cluster *platformv1.Cluster, ...) (*kubernetes.Clientset, error)
- func BuildExternalClientSetWithName(platformClient platformversionedclient.PlatformV1Interface, name string) (*kubernetes.Clientset, error)
- func BuildExternalDynamicClientSet(cluster *platformv1.Cluster, credential *platformv1.ClusterCredential) (dynamic.Interface, error)
- func BuildExternalDynamicClientSetNoStatus(cluster *platformv1.Cluster, credential *platformv1.ClusterCredential) (dynamic.Interface, error)
- func BuildExternalExtensionClientSet(cluster *platformv1.Cluster, ...) (*apiextensionsclient.Clientset, error)
- func BuildExternalExtensionClientSetNoStatus(cluster *platformv1.Cluster, ...) (*apiextensionsclient.Clientset, error)
- func BuildExternalMonitoringClientSet(cluster *platformv1.Cluster, ...) (monitoringclient.Interface, error)
- func BuildExternalMonitoringClientSetNoStatus(cluster *platformv1.Cluster, ...) (monitoringclient.Interface, error)
- func BuildExternalMonitoringClientSetWithName(platformClient platformversionedclient.PlatformV1Interface, name string) (monitoringclient.Interface, error)
- func BuildInternalDynamicClientSet(cluster *platform.Cluster, credential *platform.ClusterCredential) (dynamic.Interface, error)
- func BuildInternalDynamicClientSetNoStatus(cluster *platform.Cluster, credential *platform.ClusterCredential) (dynamic.Interface, error)
- func BuildTransport(credential *platform.ClusterCredential) (http.RoundTripper, error)
- func BuildVersionedClientSet(cluster *platformv1.Cluster, credential *platformv1.ClusterCredential) (*kubernetes.Clientset, error)
- func CheckClusterHealthzWithTimeout(platformClient platformversionedclient.PlatformV1Interface, name string, ...) error
- func ClientSet(ctx context.Context, platformClient platforminternalclient.PlatformInterface) (*kubernetes.Clientset, error)
- func ClientSetByCluster(ctx context.Context, cluster *platform.Cluster, ...) (*kubernetes.Clientset, error)
- func ClusterAddress(cluster *platform.Cluster) (*platform.ClusterAddress, error)
- func ClusterCredential(client tkeinternalclient.PlatformInterface, clusterName string) (*platform.ClusterCredential, error)
- func ClusterCredentialV1(client platformv1.PlatformV1Interface, clusterName string) (*v1.ClusterCredential, error)
- func ClusterHost(cluster *platform.Cluster) (string, error)
- func ClusterV1Host(c *platformv1.Cluster) (string, error)
- func DynamicClientByCluster(ctx context.Context, cluster *platform.Cluster, ...) (dynamic.Interface, error)
- func FilterCSIOperator(ctx context.Context, csiOperator *platform.CSIOperator) error
- func FilterCluster(ctx context.Context, cluster *platform.Cluster) error
- func FilterClusterCredential(ctx context.Context, obj *platform.ClusterCredential) error
- func FilterCronHPA(ctx context.Context, cronHPA *platform.CronHPA) error
- func FilterGPUManager(ctx context.Context, gm *platform.GPUManager) error
- func FilterHelm(ctx context.Context, helm *platform.Helm) error
- func FilterIPAM(ctx context.Context, ipam *platform.IPAM) error
- func FilterLBCF(ctx context.Context, lbcf *platform.LBCF) error
- func FilterLogCollector(ctx context.Context, decorator *platform.LogCollector) error
- func FilterMachine(ctx context.Context, machine *platform.Machine) error
- func FilterPersistentEvent(ctx context.Context, pe *platform.PersistentEvent) error
- func FilterPrometheus(ctx context.Context, prom *platform.Prometheus) error
- func FilterRegistry(ctx context.Context, registry *platform.Registry) error
- func FilterTappController(ctx context.Context, tappController *platform.TappController) error
- func FilterVolumeDecorator(ctx context.Context, decorator *platform.VolumeDecorator) error
- func GetClusterAndCredential(platformClient platforminternalclient.PlatformInterface, clusterName string) (*platform.Cluster, *platform.ClusterCredential, error)
- func GetClusterAndCredentialV1(platformClient platformversionedclient.PlatformV1Interface, clusterName string) (*platformv1.Cluster, *platformv1.ClusterCredential, error)
- func GetEvents(client *kubernetes.Clientset, uid, namespace, name, kind string) (*corev1.EventList, error)
- func GetExternalRestConfig(cluster *platformv1.Cluster, credential *platformv1.ClusterCredential) (*restclient.Config, error)
- func GetInternalRestConfig(cluster *platform.Cluster, credential *platform.ClusterCredential) (*restclient.Config, error)
- func RESTClient(ctx context.Context, platformClient platforminternalclient.PlatformInterface) (restclient.Interface, *request.RequestInfo, error)
- func RESTClientFor(clientSet *kubernetes.Clientset, apiGroup, apiVersion string) restclient.Interface
- func ResourceFromKind(kind string) string
- type CustomResource
- type CustomResourceSpec
- type EventSlice
- type Store
- func (s *Store) Create(ctx context.Context, obj runtime.Object, ...) (runtime.Object, error)
- func (s *Store) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, ...) (runtime.Object, bool, error)
- func (s *Store) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, ...) (runtime.Object, error)
- func (s *Store) Get(ctx context.Context, name string, options *v1.GetOptions) (runtime.Object, error)
- func (s *Store) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)
- func (s *Store) NamespaceScoped() bool
- func (s *Store) New() runtime.Object
- func (s *Store) NewList() runtime.Object
- func (s *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, ...) (runtime.Object, bool, error)
- func (s *Store) Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIServerLocation ¶
func APIServerLocation(ctx context.Context, platformClient tkeinternalclient.PlatformInterface) (*url.URL, http.RoundTripper, string, error)
APIServerLocation returns a URL and transport which one can use to send traffic for the specified kube api server.
func APIServerLocationByCluster ¶
func APIServerLocationByCluster(ctx context.Context, cluster *platform.Cluster, platformClient tkeinternalclient.PlatformInterface) (*url.URL, http.RoundTripper, string, error)
APIServerLocationByCluster returns a URL and transport which one can use to send traffic for the specified cluster api server.
func BuildClientSet ¶
func BuildClientSet(cluster *platform.Cluster, credential *platform.ClusterCredential) (*kubernetes.Clientset, error)
BuildClientSet creates client based on cluster information and returns it.
func BuildExternalClientSet ¶
func BuildExternalClientSet(cluster *platformv1.Cluster, client platformversionedclient.PlatformV1Interface) (*kubernetes.Clientset, error)
BuildExternalClientSet creates the clientset of kubernetes by given cluster object and returns it.
func BuildExternalClientSetWithName ¶
func BuildExternalClientSetWithName(platformClient platformversionedclient.PlatformV1Interface, name string) (*kubernetes.Clientset, error)
BuildExternalClientSetWithName creates the clientset of kubernetes by given cluster name and returns it.
func BuildExternalDynamicClientSet ¶
func BuildExternalDynamicClientSet(cluster *platformv1.Cluster, credential *platformv1.ClusterCredential) (dynamic.Interface, error)
BuildExternalDynamicClientSet creates the dynamic clientset of kubernetes by given cluster object and returns it.
func BuildExternalDynamicClientSetNoStatus ¶
func BuildExternalDynamicClientSetNoStatus(cluster *platformv1.Cluster, credential *platformv1.ClusterCredential) (dynamic.Interface, error)
BuildExternalDynamicClientSetNoStatus creates the dynamic clientset of kubernetes by given cluster object and returns it.
func BuildExternalExtensionClientSet ¶
func BuildExternalExtensionClientSet(cluster *platformv1.Cluster, client platformversionedclient.PlatformV1Interface) (*apiextensionsclient.Clientset, error)
BuildExternalExtensionClientSet creates the api extension clientset of kubernetes by given cluster object and returns it.
func BuildExternalExtensionClientSetNoStatus ¶
func BuildExternalExtensionClientSetNoStatus(cluster *platformv1.Cluster, client platformversionedclient.PlatformV1Interface) (*apiextensionsclient.Clientset, error)
BuildExternalExtensionClientSetNoStatus creates the api extension clientset of kubernetes by given cluster object and returns it.
func BuildExternalMonitoringClientSet ¶
func BuildExternalMonitoringClientSet(cluster *platformv1.Cluster, client platformversionedclient.PlatformV1Interface) (monitoringclient.Interface, error)
BuildExternalMonitoringClientSet creates the monitoring clientset of prometheus operator by given cluster object and returns it.
func BuildExternalMonitoringClientSetNoStatus ¶
func BuildExternalMonitoringClientSetNoStatus(cluster *platformv1.Cluster, client platformversionedclient.PlatformV1Interface) (monitoringclient.Interface, error)
BuildExternalMonitoringClientSetNoStatus creates the monitoring clientset of prometheus operator by given cluster object and returns it.
func BuildExternalMonitoringClientSetWithName ¶
func BuildExternalMonitoringClientSetWithName(platformClient platformversionedclient.PlatformV1Interface, name string) (monitoringclient.Interface, error)
BuildExternalMonitoringClientSetWithName creates the clientset of prometheus operator by given cluster name and returns it.
func BuildInternalDynamicClientSet ¶
func BuildInternalDynamicClientSet(cluster *platform.Cluster, credential *platform.ClusterCredential) (dynamic.Interface, error)
BuildInternalDynamicClientSet creates the dynamic clientset of kubernetes by given cluster object and returns it.
func BuildInternalDynamicClientSetNoStatus ¶
func BuildInternalDynamicClientSetNoStatus(cluster *platform.Cluster, credential *platform.ClusterCredential) (dynamic.Interface, error)
BuildInternalDynamicClientSetNoStatus creates the dynamic clientset of kubernetes by given cluster object and returns it.
func BuildTransport ¶
func BuildTransport(credential *platform.ClusterCredential) (http.RoundTripper, error)
BuildTransport create the http transport for communicate to backend kubernetes api server.
func BuildVersionedClientSet ¶
func BuildVersionedClientSet(cluster *platformv1.Cluster, credential *platformv1.ClusterCredential) (*kubernetes.Clientset, error)
BuildVersionedClientSet creates the clientset of kubernetes by given cluster object and returns it.
func CheckClusterHealthzWithTimeout ¶
func CheckClusterHealthzWithTimeout(platformClient platformversionedclient.PlatformV1Interface, name string, timeout time.Duration) error
CheckClusterHealthzWithTimeout check cluster status within timeout
func ClientSet ¶
func ClientSet(ctx context.Context, platformClient platforminternalclient.PlatformInterface) (*kubernetes.Clientset, error)
ClientSet returns the backend kubernetes clientSet
func ClientSetByCluster ¶
func ClientSetByCluster(ctx context.Context, cluster *platform.Cluster, platformClient platforminternalclient.PlatformInterface) (*kubernetes.Clientset, error)
ClientSetByCluster returns the backend kubernetes clientSet by given cluster object
func ClusterAddress ¶ added in v1.2.5
func ClusterAddress(cluster *platform.Cluster) (*platform.ClusterAddress, error)
func ClusterCredential ¶
func ClusterCredential(client tkeinternalclient.PlatformInterface, clusterName string) (*platform.ClusterCredential, error)
ClusterCredential returns the cluster's credential
func ClusterCredentialV1 ¶
func ClusterCredentialV1(client platformv1.PlatformV1Interface, clusterName string) (*v1.ClusterCredential, error)
ClusterCredentialV1 returns the versioned cluster's credential
func ClusterHost ¶
ClusterHost returns host and port for kube-apiserver of cluster.
func ClusterV1Host ¶
func ClusterV1Host(c *platformv1.Cluster) (string, error)
ClusterV1Host returns host and port for kube-apiserver of versioned cluster resource.
func DynamicClientByCluster ¶
func DynamicClientByCluster(ctx context.Context, cluster *platform.Cluster, platformClient platforminternalclient.PlatformInterface) (dynamic.Interface, error)
func FilterCSIOperator ¶
func FilterCSIOperator(ctx context.Context, csiOperator *platform.CSIOperator) error
FilterCSIOperator is used to filter csi operator that do not belong to the tenant.
func FilterCluster ¶
FilterCluster is used to filter clusters that do not belong to the tenant.
func FilterClusterCredential ¶
func FilterClusterCredential(ctx context.Context, obj *platform.ClusterCredential) error
FilterClusterCredential is used to filter ClusterCredential that do not belong to the tenant.
func FilterCronHPA ¶
FilterCronHPA is used to filter CronHPA that do not belong to the tenant.
func FilterGPUManager ¶
func FilterGPUManager(ctx context.Context, gm *platform.GPUManager) error
FilterGPUManager is used to filter helm that do not belong to the tenant.
func FilterHelm ¶
FilterHelm is used to filter helm that do not belong to the tenant.
func FilterIPAM ¶
FilterIPAM is used to filter ipam that do not belong to the tenant.
func FilterLBCF ¶
FilterLBCF is used to filter LBCF that do not belong to the tenant.
func FilterLogCollector ¶
func FilterLogCollector(ctx context.Context, decorator *platform.LogCollector) error
FilterLogCollector is used to filter log collector that do not belong to the tenant.
func FilterMachine ¶
FilterMachine is used to filter machine that do not belong to the tenant.
func FilterPersistentEvent ¶
func FilterPersistentEvent(ctx context.Context, pe *platform.PersistentEvent) error
FilterPersistentEvent is used to filter persistent event that do not belong to the tenant.
func FilterPrometheus ¶
func FilterPrometheus(ctx context.Context, prom *platform.Prometheus) error
FilterPrometheus is used to filter helm that do not belong to the tenant.
func FilterRegistry ¶
FilterRegistry is used to filter registry that do not belong to the tenant.
func FilterTappController ¶
func FilterTappController(ctx context.Context, tappController *platform.TappController) error
FilterTappController is used to filter tapp controller that do not belong to the tenant.
func FilterVolumeDecorator ¶
func FilterVolumeDecorator(ctx context.Context, decorator *platform.VolumeDecorator) error
FilterVolumeDecorator is used to filter volume decorator that do not belong to the tenant.
func GetClusterAndCredential ¶ added in v1.2.5
func GetClusterAndCredential(platformClient platforminternalclient.PlatformInterface, clusterName string) (*platform.Cluster, *platform.ClusterCredential, error)
func GetClusterAndCredentialV1 ¶ added in v1.2.5
func GetClusterAndCredentialV1(platformClient platformversionedclient.PlatformV1Interface, clusterName string) (*platformv1.Cluster, *platformv1.ClusterCredential, error)
func GetEvents ¶
func GetEvents(client *kubernetes.Clientset, uid, namespace, name, kind string) (*corev1.EventList, error)
GetEvents list the resource events by resource namespace and name.
func GetExternalRestConfig ¶
func GetExternalRestConfig(cluster *platformv1.Cluster, credential *platformv1.ClusterCredential) (*restclient.Config, error)
GetExternalRestConfig returns rest config according to cluster
func GetInternalRestConfig ¶
func GetInternalRestConfig(cluster *platform.Cluster, credential *platform.ClusterCredential) (*restclient.Config, error)
GetInternalRestConfig returns rest config according to cluster
func RESTClient ¶
func RESTClient(ctx context.Context, platformClient platforminternalclient.PlatformInterface) (restclient.Interface, *request.RequestInfo, error)
RESTClient returns the versioned rest client of clientSet.
func RESTClientFor ¶
func RESTClientFor(clientSet *kubernetes.Clientset, apiGroup, apiVersion string) restclient.Interface
RESTClientFor returns the versioned rest client of clientSet by given api version.
func ResourceFromKind ¶
ResourceFromKind returns the resource name by kind.
Types ¶
type CustomResource ¶
type CustomResource struct { metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired identities of pods in this crd. Spec CustomResourceSpec `json:"spec,omitempty"` }
CustomResource is simple version of struct crd, it is used for unmarshall.
type CustomResourceSpec ¶
type CustomResourceSpec struct {
Selector *metav1.LabelSelector `json:"selector,omitempty"`
}
CustomResourceSpec is spec for CustomResource.
type EventSlice ¶
EventSlice implements sort.Interface for []Event based on the EventTime field.
func (EventSlice) Len ¶
func (e EventSlice) Len() int
func (EventSlice) Less ¶
func (e EventSlice) Less(i, j int) bool
func (EventSlice) Swap ¶
func (e EventSlice) Swap(i, j int)
type Store ¶
type Store struct { // NewFunc returns a new instance of the type this registry returns for a // GET of a single object NewFunc func() runtime.Object // NewListFunc returns a new list of the type this registry NewListFunc func() runtime.Object Namespaced bool PlatformClient platforminternalclient.PlatformInterface }
Store implements pkg/api/rest.StandardStorage.
func (*Store) Create ¶
func (s *Store) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *v1.CreateOptions) (runtime.Object, error)
Create inserts a new item according to the unique key from the object.
func (*Store) Delete ¶
func (s *Store) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *v1.DeleteOptions) (runtime.Object, bool, error)
Delete finds a resource in the storage and deletes it.
func (*Store) DeleteCollection ¶
func (s *Store) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions *metainternalversion.ListOptions) (runtime.Object, error)
DeleteCollection selects all resources in the storage matching given 'listOptions' and deletes them. If 'options' are provided, the resource will attempt to honor them or return an invalid request error. DeleteCollection may not be atomic - i.e. it may delete some objects and still return an error after it. On success, returns a list of deleted objects.
func (*Store) Get ¶
func (s *Store) Get(ctx context.Context, name string, options *v1.GetOptions) (runtime.Object, error)
Get retrieves the item from storage.
func (*Store) List ¶
func (s *Store) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)
List returns a list of items matching labels and field according to the backend kubernetes api server.
func (*Store) NamespaceScoped ¶
NamespaceScoped indicates whether the resource is namespaced.
func (*Store) Update ¶
func (s *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *v1.UpdateOptions) (runtime.Object, bool, error)
Update finds a resource in the storage and updates it. Some implementations may allow updates creates the object - they should set the created boolean to true.
func (*Store) Watch ¶
func (s *Store) Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error)
Watch makes a matcher for the given label and field, and calls WatchPredicate. If possible, you should customize PredicateFunc to produce a matcher that matches by key. SelectionPredicate does this for you automatically.