Documentation ¶
Index ¶
- func ApplyFoundationDBCluster(ctx context.Context, k8sclient client.Client, fdb *v1beta2.FoundationDBCluster) error
- func ApplyService(ctx context.Context, k8sclient client.Client, svc *corev1.Service, ...) error
- func ApplyStatefulSet(ctx context.Context, k8sclient client.Client, st *appv1.StatefulSet, ...) error
- func CreateClientObject(ctx context.Context, k8sclient client.Client, object client.Object) error
- func CreateOrUpdateClientObject(ctx context.Context, k8sclient client.Client, object client.Object) error
- func CreateSecret(ctx context.Context, k8sclient client.Client, secret *corev1.Secret) error
- func DeleteAutoscaler(ctx context.Context, k8sclient client.Client, namespace, name string, ...) error
- func DeleteClientObject(ctx context.Context, k8sclient client.Client, object client.Object) error
- func DeleteFoundationDBCluster(ctx context.Context, k8sclient client.Client, namespace, name string) error
- func DeletePVC(ctx context.Context, k8sclient client.Client, namespace, pvcName string, ...) error
- func DeleteService(ctx context.Context, k8sclient client.Client, namespace, name string) error
- func DeleteStatefulset(ctx context.Context, k8sclient client.Client, namespace, name string) error
- func GetConfig(ctx context.Context, k8sclient client.Client, ...) (map[string]interface{}, error)
- func GetConfigMap(ctx context.Context, k8scient client.Client, namespace, name string) (*corev1.ConfigMap, error)
- func GetConfigMaps(ctx context.Context, k8scient client.Client, namespace string, ...) ([]*corev1.ConfigMap, error)
- func GetDisaggregatedMetaServiceConfigMaps(ctx context.Context, k8scient client.Client, namespace string, ...) ([]*corev1.ConfigMap, error)
- func GetFoundationDBCluster(ctx context.Context, k8sclient client.Client, namespace, name string) (*v1beta2.FoundationDBCluster, error)
- func GetPods(ctx context.Context, k8sclient client.Client, namespace string, ...) (corev1.PodList, error)
- func GetSecret(ctx context.Context, k8sclient client.Client, namespace, name string) (*corev1.Secret, error)
- func GetService(ctx context.Context, k8sclient client.Client, namespace, name string) (*corev1.Service, error)
- func PatchClientObject(ctx context.Context, k8sclient client.Client, object client.Object) error
- func PatchOrCreate(ctx context.Context, k8sclient client.Client, object client.Object) error
- func PodIsReady(status *corev1.PodStatus) bool
- func UpdateClientObject(ctx context.Context, k8sclient client.Client, object client.Object) error
- func UpdateSecret(ctx context.Context, k8sclient client.Client, secret *corev1.Secret) error
- type ServiceEqual
- type StatefulSetEqual
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyFoundationDBCluster ¶
func ApplyFoundationDBCluster(ctx context.Context, k8sclient client.Client, fdb *v1beta2.FoundationDBCluster) error
ApplyFoundationDBCluster apply FoundationDBCluster to apiserver.
func ApplyService ¶
func ApplyStatefulSet ¶
func ApplyStatefulSet(ctx context.Context, k8sclient client.Client, st *appv1.StatefulSet, equal StatefulSetEqual) error
ApplyStatefulSet when the object is not exist, create object. if exist and statefulset have been updated, patch the statefulset.
func CreateClientObject ¶
func CreateSecret ¶
func DeleteAutoscaler ¶
func DeleteAutoscaler(ctx context.Context, k8sclient client.Client, namespace, name string, autoscalerVersion dorisv1.AutoScalerVersion) error
DeleteAutoscaler as version type delete response autoscaler.
func DeleteClientObject ¶
func DeletePVC ¶
func DeletePVC(ctx context.Context, k8sclient client.Client, namespace, pvcName string, labels map[string]string) error
DeletePVC clean up existing pvc by pvc name, namespace and labels
func DeleteService ¶
DeleteService delete service.
func DeleteStatefulset ¶
DeleteStatefulset delete statefulset.
func GetConfig ¶
func GetConfig(ctx context.Context, k8sclient client.Client, configMapInfo *dorisv1.ConfigMapInfo, namespace string, componentType dorisv1.ComponentType) (map[string]interface{}, error)
GetConfig get conf from configmap by componentType , if not use configmap get an empty map.
func GetConfigMap ¶
func GetConfigMap(ctx context.Context, k8scient client.Client, namespace, name string) (*corev1.ConfigMap, error)
GetConfigMap get the configmap name=name, namespace=namespace.
func GetConfigMaps ¶
func GetConfigMaps(ctx context.Context, k8scient client.Client, namespace string, cms []dorisv1.MountConfigMapInfo) ([]*corev1.ConfigMap, error)
GetConfigMaps get the configmap by the array of MountConfigMapInfo and namespace.
func GetFoundationDBCluster ¶
func GetSecret ¶
func GetSecret(ctx context.Context, k8sclient client.Client, namespace, name string) (*corev1.Secret, error)
get the secret by namespace and name.
func GetService ¶
func GetService(ctx context.Context, k8sclient client.Client, namespace, name string) (*corev1.Service, error)
get the Service by namespace and name.
func PatchClientObject ¶
PatchClientObject patch object when the object exist. if not return error.
func PatchOrCreate ¶
PatchOrCreate patch object if not exist create object.
func PodIsReady ¶
func UpdateClientObject ¶
Types ¶
type ServiceEqual ¶
judge two services equal or not in some fields. develoer can custom the function.
type StatefulSetEqual ¶
type StatefulSetEqual func(st1 *appv1.StatefulSet, st2 *appv1.StatefulSet) bool
judge two statefulset equal or not in some fields. develoer can custom the function.