Versions in this module Expand all Collapse all v0 v0.1.0 Jun 23, 2020 Changes in this version + const LastAppliedConfigAnnotation + const LastAppliedPodTemplate + var ClusterScoped bool + var ControllerKind = v1alpha1.SchemeGroupVersion.WithKind("TikvCluster") + var ExternalTrafficPolicy string + var PDDiscoveryImage string + var ResyncDuration time.Duration + var TestClusterID string = "222" + var TestClusterName string = "test" + var TestComponentName string = "tikv" + var TestManagedByName string = "tikv-operator" + var TestMemberID string = "111" + var TestMode bool + var TestName string = "tikv-cluster" + var TestPodName string = "pod-1" + var TestStoreID string = "000" + func AnnAdditionalProm(name string, port int32) map[string]string + func AnnProm(port int32) map[string]string + func ContainerResource(req corev1.ResourceRequirements) corev1.ResourceRequirements + func DeploymentPodSpecChanged(newDep *appsv1.Deployment, oldDep *appsv1.Deployment) bool + func DiscoveryMemberName(clusterName string) string + func EmptyClone(obj runtime.Object) (runtime.Object, error) + func GetDeploymentLastAppliedPodTemplate(dep *appsv1.Deployment) (*corev1.PodSpec, error) + func GetOwnerRef(tc *v1alpha1.TikvCluster) metav1.OwnerReference + func GetPDClient(pdControl pdapi.PDControlInterface, tc *v1alpha1.TikvCluster) pdapi.PDClient + func GuaranteedUpdate(cli client.Client, obj runtime.Object, updateFunc func() error) error + func IgnoreErrorf(format string, a ...interface{}) error + func InferObjectKind(obj runtime.Object) (schema.GroupVersionKind, error) + func IngressEqual(newIngress, oldIngres *extensionsv1beta1.Ingress) (bool, error) + func Int32Ptr(i int32) *int32 + func IsIgnoreError(err error) bool + func IsRequeueError(err error) bool + func MemberConfigMapName(tc *v1alpha1.TikvCluster, member v1alpha1.MemberType) string + func NewFakePDClient(pdControl *pdapi.FakePDControl, tc *v1alpha1.TikvCluster) *pdapi.FakePDClient + func PDMemberName(clusterName string) string + func PDPeerMemberName(clusterName string) string + func ParseStorageRequest(req corev1.ResourceList) (corev1.ResourceRequirements, error) + func PumpMemberName(clusterName string) string + func PumpPeerMemberName(clusterName string) string + func RequeueErrorf(format string, a ...interface{}) error + func ServiceEqual(newSvc, oldSvc *corev1.Service) (bool, error) + func SetServiceLastAppliedConfigAnnotation(svc *corev1.Service) error + func TiCDCMemberName(clusterName string) string + func TiCDCPeerMemberName(clusterName string) string + func TiDBInitializerMemberName(clusterName string) string + func TiDBMemberName(clusterName string) string + func TiDBPeerMemberName(clusterName string) string + func TiFlashMemberName(clusterName string) string + func TiFlashPeerMemberName(clusterName string) string + func TiKVCapacity(limits corev1.ResourceList) string + func TiKVMemberName(clusterName string) string + func TiKVPeerMemberName(clusterName string) string + func WatchForController(informer cache.SharedIndexInformer, q workqueue.Interface, fn GetControllerFn, ...) + func WatchForObject(informer cache.SharedIndexInformer, q workqueue.Interface) + type ConfigMapControlInterface interface + CreateConfigMap func(controller runtime.Object, cm *corev1.ConfigMap) (*corev1.ConfigMap, error) + DeleteConfigMap func(controller runtime.Object, cm *corev1.ConfigMap) error + GetConfigMap func(controller runtime.Object, cm *corev1.ConfigMap) (*corev1.ConfigMap, error) + UpdateConfigMap func(controller runtime.Object, cm *corev1.ConfigMap) (*corev1.ConfigMap, error) + func NewRealConfigMapControl(kubeCli kubernetes.Interface, recorder record.EventRecorder) ConfigMapControlInterface + type FakeConfigMapControl struct + CmIndexer cache.Indexer + func NewFakeConfigMapControl(cmInformer coreinformers.ConfigMapInformer) *FakeConfigMapControl + func (cc *FakeConfigMapControl) CreateConfigMap(_ runtime.Object, cm *corev1.ConfigMap) (*corev1.ConfigMap, error) + func (cc *FakeConfigMapControl) DeleteConfigMap(_ runtime.Object, _ *corev1.ConfigMap) error + func (cc *FakeConfigMapControl) GetConfigMap(controller runtime.Object, cm *corev1.ConfigMap) (*corev1.ConfigMap, error) + func (cc *FakeConfigMapControl) SetCreateConfigMapError(err error, after int) + func (cc *FakeConfigMapControl) SetDeleteConfigMapError(err error, after int) + func (cc *FakeConfigMapControl) SetUpdateConfigMapError(err error, after int) + func (cc *FakeConfigMapControl) UpdateConfigMap(_ runtime.Object, cm *corev1.ConfigMap) (*corev1.ConfigMap, error) + type FakeGeneralPVCControl struct + PVCIndexer cache.Indexer + PVCLister corelisters.PersistentVolumeClaimLister + func NewFakeGeneralPVCControl(pvcInformer coreinformers.PersistentVolumeClaimInformer) *FakeGeneralPVCControl + func (fjc *FakeGeneralPVCControl) CreatePVC(_ runtime.Object, pvc *corev1.PersistentVolumeClaim) error + func (fjc *FakeGeneralPVCControl) SetCreatePVCError(err error, after int) + type FakeGenericControl struct + FakeCli client.Client + func NewFakeGenericControl(initObjects ...runtime.Object) *FakeGenericControl + func (gc *FakeGenericControl) AddObject(object runtime.Object) error + func (gc *FakeGenericControl) Create(controller, obj runtime.Object, setOwnerFlag bool) error + func (gc *FakeGenericControl) CreateOrUpdate(controller, obj runtime.Object, fn MergeFn, setOwnerFlag bool) (runtime.Object, error) + func (gc *FakeGenericControl) Delete(controller, obj runtime.Object) error + func (gc *FakeGenericControl) Exist(key client.ObjectKey, obj runtime.Object) (bool, error) + func (gc *FakeGenericControl) SetCreateError(err error, after int) + func (gc *FakeGenericControl) SetCreateOrUpdateError(err error, after int) + func (gc *FakeGenericControl) SetDeleteError(err error, after int) + func (gc *FakeGenericControl) SetExistError(err error, after int) + func (gc *FakeGenericControl) SetUpdateStatusError(err error, after int) + func (gc *FakeGenericControl) UpdateStatus(obj runtime.Object) error + type FakePVCControl struct + PVCIndexer cache.Indexer + func NewFakePVCControl(pvcInformer coreinformers.PersistentVolumeClaimInformer) *FakePVCControl + func (fpc *FakePVCControl) DeletePVC(_ *v1alpha1.TikvCluster, pvc *corev1.PersistentVolumeClaim) error + func (fpc *FakePVCControl) GetPVC(name, namespace string) (*corev1.PersistentVolumeClaim, error) + func (fpc *FakePVCControl) SetDeletePVCError(err error, after int) + func (fpc *FakePVCControl) SetUpdatePVCError(err error, after int) + func (fpc *FakePVCControl) UpdateMetaInfo(_ *v1alpha1.TikvCluster, pvc *corev1.PersistentVolumeClaim, pod *corev1.Pod) (*corev1.PersistentVolumeClaim, error) + func (fpc *FakePVCControl) UpdatePVC(_ *v1alpha1.TikvCluster, pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) + type FakePVControl struct + PVCLister corelisters.PersistentVolumeClaimLister + PVIndexer cache.Indexer + func NewFakePVControl(pvInformer coreinformers.PersistentVolumeInformer, ...) *FakePVControl + func (fpc *FakePVControl) PatchPVReclaimPolicy(_ runtime.Object, pv *corev1.PersistentVolume, ...) error + func (fpc *FakePVControl) SetUpdatePVError(err error, after int) + func (fpc *FakePVControl) UpdateMetaInfo(obj runtime.Object, pv *corev1.PersistentVolume) (*corev1.PersistentVolume, error) + type FakePodControl struct + PodIndexer cache.Indexer + func NewFakePodControl(podInformer coreinformers.PodInformer) *FakePodControl + func (fpc *FakePodControl) DeletePod(_ *v1alpha1.TikvCluster, pod *corev1.Pod) error + func (fpc *FakePodControl) SetDeletePodError(err error, after int) + func (fpc *FakePodControl) SetGetClusterError(err error, after int) + func (fpc *FakePodControl) SetGetMemberError(err error, after int) + func (fpc *FakePodControl) SetGetStoreError(err error, after int) + func (fpc *FakePodControl) SetUpdatePodError(err error, after int) + func (fpc *FakePodControl) UpdateMetaInfo(_ *v1alpha1.TikvCluster, pod *corev1.Pod) (*corev1.Pod, error) + func (fpc *FakePodControl) UpdatePod(_ *v1alpha1.TikvCluster, pod *corev1.Pod) (*corev1.Pod, error) + type FakeSecretControl struct + func (rsc *FakeSecretControl) Check(ns string, secretName string) bool + func (rsc *FakeSecretControl) Load(ns string, secretName string) ([]byte, []byte, error) + type FakeServiceControl struct + EpsIndexer cache.Indexer + SvcIndexer cache.Indexer + SvcLister corelisters.ServiceLister + TcIndexer cache.Indexer + TcLister v1listers.TikvClusterLister + func NewFakeServiceControl(svcInformer coreinformers.ServiceInformer, ...) *FakeServiceControl + func (ssc *FakeServiceControl) CreateService(_ *v1alpha1.TikvCluster, svc *corev1.Service) error + func (ssc *FakeServiceControl) DeleteService(_ *v1alpha1.TikvCluster, _ *corev1.Service) error + func (ssc *FakeServiceControl) SetCreateServiceError(err error, after int) + func (ssc *FakeServiceControl) SetDeleteServiceError(err error, after int) + func (ssc *FakeServiceControl) SetUpdateServiceError(err error, after int) + func (ssc *FakeServiceControl) UpdateService(_ *v1alpha1.TikvCluster, svc *corev1.Service) (*corev1.Service, error) + type FakeStatefulSetControl struct + SetIndexer cache.Indexer + SetLister appslisters.StatefulSetLister + TcIndexer cache.Indexer + TcLister v1listers.TikvClusterLister + func NewFakeStatefulSetControl(setInformer appsinformers.StatefulSetInformer, ...) *FakeStatefulSetControl + func (ssc *FakeStatefulSetControl) CreateStatefulSet(_ *v1alpha1.TikvCluster, set *apps.StatefulSet) error + func (ssc *FakeStatefulSetControl) DeleteStatefulSet(_ *v1alpha1.TikvCluster, _ *apps.StatefulSet) error + func (ssc *FakeStatefulSetControl) SetCreateStatefulSetError(err error, after int) + func (ssc *FakeStatefulSetControl) SetDeleteStatefulSetError(err error, after int) + func (ssc *FakeStatefulSetControl) SetStatusChange(fn func(*apps.StatefulSet)) + func (ssc *FakeStatefulSetControl) SetUpdateStatefulSetError(err error, after int) + func (ssc *FakeStatefulSetControl) UpdateStatefulSet(_ *v1alpha1.TikvCluster, set *apps.StatefulSet) (*apps.StatefulSet, error) + type FakeTikvClusterControl struct + TcIndexer cache.Indexer + TcLister listers.TikvClusterLister + func NewFakeTikvClusterControl(tcInformer tcinformers.TikvClusterInformer) *FakeTikvClusterControl + func (ssc *FakeTikvClusterControl) SetUpdateTikvClusterError(err error, after int) + func (ssc *FakeTikvClusterControl) UpdateTikvCluster(tc *v1alpha1.TikvCluster, _ *v1alpha1.TikvClusterStatus, ...) (*v1alpha1.TikvCluster, error) + type GeneralPVCControlInterface interface + CreatePVC func(object runtime.Object, pvc *corev1.PersistentVolumeClaim) error + func NewRealGeneralPVCControl(kubeCli kubernetes.Interface, recorder record.EventRecorder) GeneralPVCControlInterface + type GenericControlInterface interface + Create func(controller, obj runtime.Object, setOwnerFlag bool) error + CreateOrUpdate func(controller, obj runtime.Object, mergeFn MergeFn, setOwnerFlag bool) (runtime.Object, error) + Delete func(controller, obj runtime.Object) error + Exist func(key client.ObjectKey, obj runtime.Object) (bool, error) + UpdateStatus func(obj runtime.Object) error + func NewRealGenericControl(client client.Client, recorder record.EventRecorder) GenericControlInterface + type GetControllerFn func(ns, name string) (runtime.Object, error) + type IgnoreError struct + func (re *IgnoreError) Error() string + type MergeFn func(existing, desired runtime.Object) error + type PVCControlInterface interface + DeletePVC func(*v1alpha1.TikvCluster, *corev1.PersistentVolumeClaim) error + GetPVC func(name, namespace string) (*corev1.PersistentVolumeClaim, error) + UpdateMetaInfo func(*v1alpha1.TikvCluster, *corev1.PersistentVolumeClaim, *corev1.Pod) (*corev1.PersistentVolumeClaim, error) + UpdatePVC func(*v1alpha1.TikvCluster, *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) + func NewRealPVCControl(kubeCli kubernetes.Interface, recorder record.EventRecorder, ...) PVCControlInterface + type PVControlInterface interface + PatchPVReclaimPolicy func(runtime.Object, *corev1.PersistentVolume, corev1.PersistentVolumeReclaimPolicy) error + UpdateMetaInfo func(runtime.Object, *corev1.PersistentVolume) (*corev1.PersistentVolume, error) + func NewRealPVControl(kubeCli kubernetes.Interface, ...) PVControlInterface + type PodControlInterface interface + DeletePod func(*v1alpha1.TikvCluster, *corev1.Pod) error + UpdateMetaInfo func(*v1alpha1.TikvCluster, *corev1.Pod) (*corev1.Pod, error) + UpdatePod func(*v1alpha1.TikvCluster, *corev1.Pod) (*corev1.Pod, error) + func NewRealPodControl(kubeCli kubernetes.Interface, pdControl pdapi.PDControlInterface, ...) PodControlInterface + type RequestTracker struct + func (rt *RequestTracker) ErrorReady() bool + func (rt *RequestTracker) GetError() error + func (rt *RequestTracker) GetRequests() int + func (rt *RequestTracker) Inc() + func (rt *RequestTracker) Reset() + func (rt *RequestTracker) SetAfter(after int) *RequestTracker + func (rt *RequestTracker) SetError(err error) *RequestTracker + func (rt *RequestTracker) SetRequests(requests int) *RequestTracker + type RequeueError struct + func (re *RequeueError) Error() string + type SecretControlInterface interface + Check func(ns string, secretName string) bool + Load func(ns string, secretName string) ([]byte, []byte, error) + func NewFakeSecretControl(kubeCli kubernetes.Interface) SecretControlInterface + func NewRealSecretControl(kubeCli kubernetes.Interface) SecretControlInterface + type ServiceControlInterface interface + CreateService func(*v1alpha1.TikvCluster, *corev1.Service) error + DeleteService func(*v1alpha1.TikvCluster, *corev1.Service) error + UpdateService func(*v1alpha1.TikvCluster, *corev1.Service) (*corev1.Service, error) + func NewRealServiceControl(kubeCli kubernetes.Interface, svcLister corelisters.ServiceLister, ...) ServiceControlInterface + type StatefulSetControlInterface interface + CreateStatefulSet func(*v1alpha1.TikvCluster, *apps.StatefulSet) error + DeleteStatefulSet func(*v1alpha1.TikvCluster, *apps.StatefulSet) error + UpdateStatefulSet func(*v1alpha1.TikvCluster, *apps.StatefulSet) (*apps.StatefulSet, error) + func NewRealStatefuSetControl(kubeCli kubernetes.Interface, setLister appslisters.StatefulSetLister, ...) StatefulSetControlInterface + type TikvClusterControlInterface interface + UpdateTikvCluster func(*v1alpha1.TikvCluster, *v1alpha1.TikvClusterStatus, ...) (*v1alpha1.TikvCluster, error) + func NewRealTikvClusterControl(cli versioned.Interface, tcLister listers.TikvClusterLister, ...) TikvClusterControlInterface + type TypedControlInterface interface + Create func(controller, obj runtime.Object) error + CreateOrUpdateConfigMap func(controller runtime.Object, cm *corev1.ConfigMap) (*corev1.ConfigMap, error) + CreateOrUpdateDeployment func(controller runtime.Object, deploy *appsv1.Deployment) (*appsv1.Deployment, error) + CreateOrUpdateIngress func(controller runtime.Object, ingress *extensionsv1beta1.Ingress) (*extensionsv1beta1.Ingress, error) + CreateOrUpdatePVC func(controller runtime.Object, pvc *corev1.PersistentVolumeClaim, ...) (*corev1.PersistentVolumeClaim, error) + CreateOrUpdateRole func(controller runtime.Object, role *rbacv1.Role) (*rbacv1.Role, error) + CreateOrUpdateRoleBinding func(controller runtime.Object, cr *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error) + CreateOrUpdateSecret func(controller runtime.Object, secret *corev1.Secret) (*corev1.Secret, error) + CreateOrUpdateService func(controller runtime.Object, svc *corev1.Service) (*corev1.Service, error) + CreateOrUpdateServiceAccount func(controller runtime.Object, sa *corev1.ServiceAccount) (*corev1.ServiceAccount, error) + Delete func(controller, obj runtime.Object) error + Exist func(key client.ObjectKey, obj runtime.Object) (bool, error) + UpdateStatus func(newStatus runtime.Object) error + func NewTypedControl(control GenericControlInterface) TypedControlInterface