Documentation ¶
Index ¶
- 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 DeleteAutoscaler(ctx context.Context, k8sclient client.Client, namespace, name string, ...) error
- func DeleteClientObject(ctx context.Context, k8sclient client.Client, object client.Object) 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 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 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
- type ServiceEqual
- type StatefulSetEqual
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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 DeleteService ¶
DeleteService delete service.
func DeleteStatefulset ¶
DeleteStatefulset delete statefulset.
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 PatchClientObject ¶
PatchClientObject patch object when the object exist. if not return error.
func PatchOrCreate ¶
PatchOrCreate patch object if not exist create object.
func PodIsReady ¶
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.