Versions in this module Expand all Collapse all v0 v0.1.0 Jun 4, 2023 Changes in this version + const Arbiter + const ClusterVip + const ConfigMapPP + const CustomConfigMapPP + const DefaultPort + const DefaultServiceName + const Init + const LabelClusterVipInstance + const LabelKeyApp + const LabelKeyInstance + const Mongo + const ServicePP + func BaseLabel(additionalLabels map[string]string, name string) map[string]string + func CreateObject(cli client.Client, obj interface{}) error + func DeleteObj(cli client.Client, obj client.Object) error + func DeleteObjByLabel(cli client.Client, obj client.Object, label map[string]string, ...) error + func DeleteSts(cli client.Client, namespace string, name string) error + func DeleteStsByLabel(cli client.Client, namespace string, selector map[string]string) error + func Ensure(cli client.Client, cr *middlewarev1alpha1.MultiCloudMongoDB, ...) error + func EnsureConfigMapUpdate(cli client.Client, cr *middlewarev1alpha1.MultiCloudMongoDB, ...) error + func EnsureMongoWithoutSetRef(cli client.Client, obj metav1.Object, found client.Object) error + func EnsureWithoutSetRef(cli client.Client, obj metav1.Object, found client.Object) error + func ExecCmd(config *rest.Config, pod *corev1.Pod, containerName string, command string) (string, string, error) + func GenerateArbiterLabel(additionalLabels map[string]string, serviceName string) map[string]string + func GenerateArbiterService(name, namespace string, labels, selector map[string]string, headless bool) *corev1.Service + func GenerateArbiterServicePPLabel(name string) map[string]string + func GenerateClusterVIPLabel(vip string) map[string]string + func GenerateClusterVipLabel(additionalLabels map[string]string, name string) map[string]string + func GenerateConfigMap(name, namespace string, labels map[string]string, hostConf *model.HostConf) *corev1.ConfigMap + func GenerateConfigMapLabel(additionalLabels map[string]string, name string) map[string]string + func GenerateConfigMapPPLabel(additionalLabels map[string]string, name string) map[string]string + func GenerateCustomConfigMapPPLabel(additionalLabels map[string]string, name string) map[string]string + func GenerateInitLabel(additionalLabels map[string]string, name string) map[string]string + func GenerateMongo(name, namespace string, labels map[string]string, ...) *middlewarev1alpha1.MongoDB + func GenerateMongoLabel(additionalLabels map[string]string, name string) map[string]string + func GenerateService(name, namespace string, labels, selector map[string]string, headless bool) *corev1.Service + func GenerateServiceLabel(additionalLabels map[string]string, name, serviceName string) map[string]string + func GenerateServicePPLabel(additionalLabels map[string]string, name string) map[string]string + func GetConfig() *rest.Config + func GetConfigMap(cli client.Client, name, namespace string) (*corev1.ConfigMap, error) + func GetJob(cli client.Client, namespace, name string) (*batchv1.Job, error) + func GetMongoInstanceByName(cli client.Client, name, namespace string) (*middlewarev1alpha1.MongoDB, error) + func GetPod(cli client.Client, namespace, name string) (*corev1.Pod, error) + func GetService(cli client.Client, namespace, name string) (*corev1.Service, error) + func GetServiceByNodePort(nodePort int32, serviceList []corev1.Service) (*corev1.Service, error) + func GetSts(cli client.Client, stsName, namespace string) (*appsv1.StatefulSet, error) + func GetSvc(cli client.Client, namespace, name string) (*corev1.Service, error) + func IsExistAndDeleted(client client.Client, name, namespace string, found client.Object) error + func IsExists(client client.Client, obj metav1.Object, found client.Object) (exists bool, err error) + func IsExistsByName(client client.Client, name, namespace string, found client.Object) (exists bool, err error) + func IsSubLabel(super, sub map[string]string) bool + func ListPod(cli client.Client, namespace string, selector map[string]string) ([]corev1.Pod, error) + func ListService(cli client.Client, namespace string, selector map[string]string) ([]corev1.Service, error) + func ListSts(cli client.Client, namespace string, selector map[string]string) ([]appsv1.StatefulSet, error) + func MergeLabels(allLabels ...map[string]string) map[string]string + func ObjIsExists(client client.Client, found client.Object) (exists bool, err error) + func ScaleDownCleaner(cli client.Client, schema *runtime.Scheme, serviceList []corev1.Service, ...) error + func SetRefAndCreateObject(owner metav1.Object, obj interface{}, scheme *runtime.Scheme, ...) error + func UpdateObject(cli client.Client, obj client.Object) error + func UpdateObjectStatus(cli client.Client, obj client.Object) error + func UpsertConfigMapDeleteArbiter(client client.Client, name, namespace string, found client.Object) error + func UpsertObject(cli client.Client, obj interface{}) error + func UpsertOpEnsure(cli client.Client, cr *middlewarev1alpha1.MultiCloudMongoDB, ...) error + func UpsertPPEnsure(cli client.Client, cr *middlewarev1alpha1.MultiCloudMongoDB, ...) error