Documentation ¶
Index ¶
- Constants
- Variables
- func CheckRBAC(ctx context.Context, c client.Client, namespace string) error
- func GetPodLog(ctx context.Context, client kubernetes.Interface, ...) (string, error)
- func HasFinalizer(obj client.Object, finalizer string) bool
- func UpdateFinalizer(ctx context.Context, c client.Client, object client.Object, op FinalizerOpType, ...) error
- func ValidVersion(ver *version.Info) (bool, error)
- type BackupUpdateStatus
- type ClientSet
- type ConfigMap
- type Deployment
- type FakeNebulaCluster
- func (f *FakeNebulaCluster) CreateNebulaCluster(_ *v1alpha1.NebulaCluster) error
- func (f *FakeNebulaCluster) DeleteNebulaCluster(_, _ string) error
- func (f *FakeNebulaCluster) GetNebulaCluster(_, _ string) (*v1alpha1.NebulaCluster, error)
- func (f *FakeNebulaCluster) UpdateNebulaCluster(_ *v1alpha1.NebulaCluster) error
- func (f *FakeNebulaCluster) UpdateNebulaClusterStatus(_ *v1alpha1.NebulaCluster) error
- type FinalizerOpType
- type Ingress
- type Job
- type NebulaAutoscaler
- type NebulaBackup
- type NebulaCluster
- type NebulaCronBackup
- type NebulaRestore
- type Node
- type PersistentVolume
- type PersistentVolumeClaim
- type Pod
- type RestoreUpdateStatus
- type Secret
- type Service
- type StorageClass
- type Workload
Constants ¶
View Source
const IsDefaultStorageClassAnnotation = "storageclass.kubernetes.io/is-default-class"
Variables ¶
View Source
var ( ErrInitializedNotReady = errors.New("pod initialized not ready") ErrContainerCreating = errors.New("target container is creating") )
View Source
var ErrDefaultStorageClassNotFound = errors.New("default storageclass not found")
Functions ¶
func UpdateFinalizer ¶ added in v1.8.0
Types ¶
type BackupUpdateStatus ¶ added in v1.8.0
type BackupUpdateStatus struct { Type v1alpha1.BackupType BackupName *string TimeStarted *metav1.Time TimeCompleted *metav1.Time ConditionType v1alpha1.BackupConditionType }
type ClientSet ¶
type ClientSet interface { Node() Node Secret() Secret ConfigMap() ConfigMap PV() PersistentVolume PVC() PersistentVolumeClaim Pod() Pod Service() Service Ingress() Ingress Workload() Workload Deployment() Deployment Job() Job NebulaCluster() NebulaCluster NebulaBackup() NebulaBackup NebulaCronBackup() NebulaCronBackup NebulaRestore() NebulaRestore NebulaAutoscaler() NebulaAutoscaler StorageClass() StorageClass }
type ConfigMap ¶
type ConfigMap interface { CreateOrUpdateConfigMap(cm *corev1.ConfigMap) error GetConfigMap(namespace, cmName string) (*corev1.ConfigMap, error) DeleteConfigMap(namespace, cmName string) error }
func NewConfigMap ¶
type Deployment ¶ added in v1.4.1
type Deployment interface { CreateDeployment(deploy *appsv1.Deployment) error GetDeployment(namespace string, name string) (*appsv1.Deployment, error) UpdateDeployment(deploy *appsv1.Deployment) error DeleteDeployment(deploy *appsv1.Deployment) error }
func NewDeployment ¶ added in v1.4.1
func NewDeployment(kubecli client.Client) Deployment
type FakeNebulaCluster ¶
type FakeNebulaCluster struct {
// contains filtered or unexported fields
}
func (*FakeNebulaCluster) CreateNebulaCluster ¶ added in v1.4.0
func (f *FakeNebulaCluster) CreateNebulaCluster(_ *v1alpha1.NebulaCluster) error
func (*FakeNebulaCluster) DeleteNebulaCluster ¶ added in v1.4.0
func (f *FakeNebulaCluster) DeleteNebulaCluster(_, _ string) error
func (*FakeNebulaCluster) GetNebulaCluster ¶
func (f *FakeNebulaCluster) GetNebulaCluster(_, _ string) (*v1alpha1.NebulaCluster, error)
func (*FakeNebulaCluster) UpdateNebulaCluster ¶ added in v0.9.0
func (f *FakeNebulaCluster) UpdateNebulaCluster(_ *v1alpha1.NebulaCluster) error
func (*FakeNebulaCluster) UpdateNebulaClusterStatus ¶
func (f *FakeNebulaCluster) UpdateNebulaClusterStatus(_ *v1alpha1.NebulaCluster) error
type FinalizerOpType ¶ added in v1.8.0
type FinalizerOpType string
const ( AddFinalizerOpType FinalizerOpType = "Add" RemoveFinalizerOpType FinalizerOpType = "Remove" )
type Ingress ¶ added in v0.9.0
type Ingress interface { CreateOrUpdateIngress(ingress *networkingv1.Ingress) error GetIngress(namespace, ingressName string) (*networkingv1.Ingress, error) DeleteIngress(namespace, ingressName string) error }
func NewIngress ¶ added in v0.9.0
type Job ¶ added in v1.8.0
type NebulaAutoscaler ¶ added in v1.7.0
type NebulaAutoscaler interface { GetNebulaAutoscaler(namespace, name string) (*v1alpha1.NebulaAutoscaler, error) UpdateNebulaAutoscalerStatus(na *v1alpha1.NebulaAutoscaler) error }
func NewNebulaAutoscaler ¶ added in v1.7.0
func NewNebulaAutoscaler(client client.Client) NebulaAutoscaler
type NebulaBackup ¶ added in v1.8.0
type NebulaBackup interface { CreateNebulaBackup(backup *v1alpha1.NebulaBackup) error GetNebulaBackup(namespace, name string) (*v1alpha1.NebulaBackup, error) ListNebulaBackups(namespace string, selector labels.Selector) ([]v1alpha1.NebulaBackup, error) UpdateNebulaBackup(backup *v1alpha1.NebulaBackup) error UpdateNebulaBackupStatus(backup *v1alpha1.NebulaBackup, condition *v1alpha1.BackupCondition, newStatus *BackupUpdateStatus) error DeleteNebulaBackup(namespace, name string) error }
func NewNebulaBackup ¶ added in v1.8.0
func NewNebulaBackup(client client.Client) NebulaBackup
type NebulaCluster ¶
type NebulaCluster interface { CreateNebulaCluster(nc *v1alpha1.NebulaCluster) error GetNebulaCluster(namespace, name string) (*v1alpha1.NebulaCluster, error) UpdateNebulaCluster(nc *v1alpha1.NebulaCluster) error UpdateNebulaClusterStatus(nc *v1alpha1.NebulaCluster) error DeleteNebulaCluster(namespace, name string) error }
func NewFakeNebulaCluster ¶
func NewFakeNebulaCluster(client client.Client) NebulaCluster
func NewNebulaCluster ¶
func NewNebulaCluster(client client.Client) NebulaCluster
type NebulaCronBackup ¶ added in v1.8.0
type NebulaCronBackup interface { GetCronBackup(namespace, name string) (*v1alpha1.NebulaCronBackup, error) UpdateCronBackupStatus(cronBackup *v1alpha1.NebulaCronBackup) error }
func NewCronNebulaBackup ¶ added in v1.8.0
func NewCronNebulaBackup(client client.Client) NebulaCronBackup
type NebulaRestore ¶ added in v1.4.0
type NebulaRestore interface { GetNebulaRestore(namespace, name string) (*v1alpha1.NebulaRestore, error) UpdateNebulaRestoreStatus(restore *v1alpha1.NebulaRestore, condition *v1alpha1.RestoreCondition, newStatus *RestoreUpdateStatus) error }
func NewNebulaRestore ¶ added in v1.4.0
func NewNebulaRestore(client client.Client) NebulaRestore
type PersistentVolume ¶
type PersistentVolume interface { GetPersistentVolume(name string) (*corev1.PersistentVolume, error) PatchPVReclaimPolicy(pv *corev1.PersistentVolume, policy corev1.PersistentVolumeReclaimPolicy) error UpdateMetaInfo(obj runtime.Object, pv *corev1.PersistentVolume) error UpdatePersistentVolume(pv *corev1.PersistentVolume) error }
func NewPV ¶
func NewPV(kubecli client.Client) PersistentVolume
type PersistentVolumeClaim ¶
type PersistentVolumeClaim interface { GetPVC(namespace, name string) (*corev1.PersistentVolumeClaim, error) UpdateMetaInfo(pvc *corev1.PersistentVolumeClaim, pod *corev1.Pod, isReclaimEnabled bool) error UpdatePVC(pvc *corev1.PersistentVolumeClaim) error DeletePVC(namespace string, name string) error ListPVCs(namespace string, selector labels.Selector) ([]corev1.PersistentVolumeClaim, error) }
func NewPVC ¶
func NewPVC(kubecli client.Client) PersistentVolumeClaim
type Pod ¶
type RestoreUpdateStatus ¶ added in v1.4.0
type Service ¶
type Service interface { CreateService(service *corev1.Service) error GetService(namespace string, name string) (*corev1.Service, error) UpdateService(service *corev1.Service) error DeleteService(namespace string, name string) error }
func NewService ¶
type StorageClass ¶ added in v1.8.1
type StorageClass interface { GetStorageClass(scName string) (*storagev1.StorageClass, error) GetDefaultStorageClass() (*storagev1.StorageClass, error) }
func NewStorageClass ¶ added in v1.8.1
func NewStorageClass(client client.Client) StorageClass
type Workload ¶
type Workload interface { GetWorkload(namespace string, name string, gvk schema.GroupVersionKind) (*unstructured.Unstructured, error) CreateWorkload(obj *unstructured.Unstructured) error UpdateWorkload(obj *unstructured.Unstructured) error DeleteWorkload(obj *unstructured.Unstructured) error }
func NewWorkload ¶
Click to show internal directories.
Click to hide internal directories.