Documentation ¶
Index ¶
- func BuiltInCustomFunctions(c *configTemplateBuilder, task *intctrltypes.ReconcileTask) *gotemplate.BuiltInObjectsFunc
- func CheckTLSSecretRef(ctx context.Context, cli client2.ReadonlyClient, namespace string, ...) error
- func ComposeTLSSecret(namespace, clusterName, componentName string) (*v1.Secret, error)
- func DoPITRCleanup(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster) error
- func DoPITRIfNeed(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster) (shouldRequeue bool, err error)
- func DoPITRPrepare(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, ...) error
- func GenerateTLSSecretName(clusterName, componentName string) string
- func GetTLSKeyWord(cType string) string
- func IsTLSSettingsUpdated(cType string, oldCm v1.ConfigMap, newCm v1.ConfigMap) bool
- func PrepareComponentResources(reqCtx intctrlutil.RequestCtx, cli client.Client, ...) error
- type PointInTimeRecoveryManager
- type ResourceDefinition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuiltInCustomFunctions ¶
func BuiltInCustomFunctions(c *configTemplateBuilder, task *intctrltypes.ReconcileTask) *gotemplate.BuiltInObjectsFunc
BuiltInCustomFunctions builds a map of customized functions for KubeBlocks
func CheckTLSSecretRef ¶
func CheckTLSSecretRef(ctx context.Context, cli client2.ReadonlyClient, namespace string, secretRef *dbaasv1alpha1.TLSSecretRef) error
func ComposeTLSSecret ¶
ComposeTLSSecret compose a TSL secret object. REVIEW/TODO:
- missing public function doc
- should avoid using Go template to call a function, this is too hack & costly, should just call underlying registered Go template function.
func DoPITRCleanup ¶
DoPITRCleanup cleanup the resources and annotations after point in time recovery
func DoPITRIfNeed ¶
func DoPITRIfNeed(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster) (shouldRequeue bool, err error)
DoPITRIfNeed checks if run restore job and copy data for point in time recovery
func DoPITRPrepare ¶
func DoPITRPrepare(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, component *component.SynthesizedComponent) error
DoPITRPrepare prepares init container and pvc before point in time recovery
func GenerateTLSSecretName ¶
func GetTLSKeyWord ¶
func IsTLSSettingsUpdated ¶
func PrepareComponentResources ¶
func PrepareComponentResources(reqCtx intctrlutil.RequestCtx, cli client.Client, task *intctrltypes.ReconcileTask) error
PrepareComponentResources generate all necessary sub-resources objects used in component, like Secret, ConfigMap, Service, StatefulSet, Deployment, Volume, PodDisruptionBudget etc. Generated resources are cached in task.applyObjs.
Types ¶
type PointInTimeRecoveryManager ¶
type PointInTimeRecoveryManager struct { client.Client Ctx context.Context Cluster *appsv1alpha1.Cluster // contains filtered or unexported fields }
PointInTimeRecoveryManager pitr manager functions 1. get the latest base backup 2. get the next earliest backup 3. add log pvc by datasource volume snapshot 4. create init container to prepare log 5. run recovery jobs 6. cleanup