Documentation ¶
Index ¶
- func APIServerLocation(ctx context.Context, platformClient platforminternalclient.PlatformInterface) (*url.URL, http.RoundTripper, string, error)
- func APIServerLocationByCluster(ctx context.Context, cluster *platformv1.Cluster) (*url.URL, http.RoundTripper, string, error)
- func BuildExternalClientSet(ctx context.Context, cluster *platformv1.Cluster, ...) (*kubernetes.Clientset, error)
- func BuildExternalClientSetWithName(ctx context.Context, ...) (*kubernetes.Clientset, error)
- func BuildVersionedClientSet(cluster *platformv1.Cluster, cc *platformv1.ClusterCredential) (*kubernetes.Clientset, error)
- func ClientSetByCluster(ctx context.Context, cluster *platform.Cluster, ...) (*kubernetes.Clientset, 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 FilterMachine(ctx context.Context, machine *platform.Machine) error
- func FilterPersistentEvent(ctx context.Context, pe *platform.PersistentEvent) error
- func FilterRegistry(ctx context.Context, registry *platform.Registry) error
- func FilterTappController(ctx context.Context, tappController *platform.TappController) error
- func GetEvents(ctx context.Context, client *kubernetes.Clientset, ...) (*corev1.EventList, error)
- func GetInvolvedObjectUIDMap(events EventSlice) map[string][]corev1.Event
- func GetPlatformVersionsFromClusterInfo(ctx context.Context, client kubernetes.Interface) (tkeVersion string, k8sValidVersions []string, err error)
- func PrepareClusterScale(cluster *platform.Cluster, oldCluster *platform.Cluster) ([]platform.ClusterMachine, error)
- func ResourceFromKind(kind string) string
- type CustomResource
- type CustomResourceSpec
- type EventSlice
- type Pods
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIServerLocation ¶
func APIServerLocation(ctx context.Context, platformClient platforminternalclient.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 *platformv1.Cluster) (*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 BuildExternalClientSet ¶
func BuildExternalClientSet(ctx context.Context, 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(ctx context.Context, platformClient platformversionedclient.PlatformV1Interface, name string) (*kubernetes.Clientset, error)
BuildExternalClientSetWithName creates the clientset of kubernetes by given cluster name and returns it.
func BuildVersionedClientSet ¶
func BuildVersionedClientSet(cluster *platformv1.Cluster, cc *platformv1.ClusterCredential) (*kubernetes.Clientset, error)
BuildVersionedClientSet creates the clientset of kubernetes by given cluster object and returns it.
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 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 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 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 GetEvents ¶
func GetEvents(ctx context.Context, client *kubernetes.Clientset, uid, namespace, name, kind string) (*corev1.EventList, error)
GetEvents list the resource events by resource namespace and name.
func GetInvolvedObjectUIDMap ¶ added in v1.9.1
func GetInvolvedObjectUIDMap(events EventSlice) map[string][]corev1.Event
GetInvolvedObjectUIDMap Get uid events map
func GetPlatformVersionsFromClusterInfo ¶ added in v1.6.0
func PrepareClusterScale ¶ added in v1.9.0
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 GetResourcesEvents ¶ added in v1.9.1
func GetResourcesEvents(ctx context.Context, client *kubernetes.Clientset, namespace string, listOptions []metav1.ListOptions) (EventSlice, []error)
GetResourcesEvents list the resources events by resource namespace.
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)