Documentation ¶
Index ¶
- func BuiltInCustomFunctions(c *configTemplateBuilder, component *component.SynthesizedComponent, ...) *gotemplate.BuiltInObjectsFunc
- func CheckAndUpdateItemStatus(updated *appsv1alpha1.Configuration, item appsv1alpha1.ConfigurationItemDetail, ...)
- func CheckEnvFrom(container *corev1.Container, cmName string) bool
- func DoMerge(baseData map[string]string, patch map[string]appsv1alpha1.ConfigParams, ...) (map[string]string, error)
- func NewConfigReconcileTask(resourceCtx *intctrlutil.ResourceCtx, cluster *appsv1alpha1.Cluster, ...) *configOperator
- func NewCreatePipeline(ctx ReconcileCtx) *pipeline
- func NewReconcilePipeline(ctx ReconcileCtx, item appsv1alpha1.ConfigurationItemDetail, ...) *updatePipeline
- func SyncEnvConfigmap(configSpec appsv1alpha1.ComponentConfigSpec, cmObj *corev1.ConfigMap, ...) error
- func UpdateCMConfigSpecLabels(cm *corev1.ConfigMap, configSpec appsv1alpha1.ComponentConfigSpec)
- type ComponentVisitor
- type DecoratedVisitor
- type ReconcileCtx
- type ResourceDefinition
- type TemplateMerger
- type Visitor
- type VisitorFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuiltInCustomFunctions ¶
func BuiltInCustomFunctions(c *configTemplateBuilder, component *component.SynthesizedComponent, localObjs []client.Object) *gotemplate.BuiltInObjectsFunc
BuiltInCustomFunctions builds a map of customized functions for KubeBlocks
func CheckAndUpdateItemStatus ¶
func CheckAndUpdateItemStatus(updated *appsv1alpha1.Configuration, item appsv1alpha1.ConfigurationItemDetail, reversion string)
func DoMerge ¶
func DoMerge(baseData map[string]string, patch map[string]appsv1alpha1.ConfigParams, cc *appsv1alpha1.ConfigConstraint, configSpec appsv1alpha1.ComponentConfigSpec) (map[string]string, error)
func NewConfigReconcileTask ¶
func NewConfigReconcileTask(resourceCtx *intctrlutil.ResourceCtx, cluster *appsv1alpha1.Cluster, clusterVersion *appsv1alpha1.ClusterVersion, component *component.SynthesizedComponent, podSpec *corev1.PodSpec, localObjs []client.Object, ) *configOperator
func NewCreatePipeline ¶
func NewCreatePipeline(ctx ReconcileCtx) *pipeline
func NewReconcilePipeline ¶
func NewReconcilePipeline(ctx ReconcileCtx, item appsv1alpha1.ConfigurationItemDetail, itemStatus *appsv1alpha1.ConfigurationItemDetailStatus, configSpec *appsv1alpha1.ComponentConfigSpec) *updatePipeline
func SyncEnvConfigmap ¶
func SyncEnvConfigmap(configSpec appsv1alpha1.ComponentConfigSpec, cmObj *corev1.ConfigMap, cc *appsv1alpha1.ConfigConstraintSpec, cli client.Client, ctx context.Context) error
func UpdateCMConfigSpecLabels ¶
func UpdateCMConfigSpecLabels(cm *corev1.ConfigMap, configSpec appsv1alpha1.ComponentConfigSpec)
Types ¶
type ComponentVisitor ¶
type ComponentVisitor struct {
// contains filtered or unexported fields
}
ComponentVisitor implements Visitor, it will visit the component.SynthesizedComponent
func (*ComponentVisitor) Visit ¶
func (r *ComponentVisitor) Visit(fn VisitorFunc) error
Visit implements Visitor
type DecoratedVisitor ¶
type DecoratedVisitor struct {
// contains filtered or unexported fields
}
DecoratedVisitor will invoke the decorators in order prior to invoking the visitor function passed to Visit. An error will terminate the visit.
func (DecoratedVisitor) Visit ¶
func (v DecoratedVisitor) Visit(fn VisitorFunc) error
Visit implements Visitor
type ReconcileCtx ¶
type ReconcileCtx struct { *intctrlutil.ResourceCtx Cluster *appsv1alpha1.Cluster ClusterVer *appsv1alpha1.ClusterVersion Component *component.SynthesizedComponent PodSpec *corev1.PodSpec Cache []client.Object }
type ResourceDefinition ¶
type TemplateMerger ¶
type TemplateMerger interface { // Merge merges the baseData with the data from the template. Merge(baseData map[string]string, updatedData map[string]string) (map[string]string, error) // contains filtered or unexported methods }
func NewTemplateMerger ¶
func NewTemplateMerger(template appsv1alpha1.ConfigTemplateExtension, ctx context.Context, cli client.Client, builder *configTemplateBuilder, configSpec appsv1alpha1.ComponentConfigSpec, ccSpec *appsv1alpha1.ConfigConstraintSpec) (TemplateMerger, error)
type Visitor ¶
type Visitor interface {
Visit(VisitorFunc) error
}
func NewDecoratedVisitor ¶
func NewDecoratedVisitor(v Visitor, fn ...VisitorFunc) Visitor
NewDecoratedVisitor will create a visitor that invokes the provided visitor functions before the user supplied visitor function is invoked, giving them the opportunity to mutate the Info object or terminate early with an error.
type VisitorFunc ¶
type VisitorFunc func(*component.SynthesizedComponent, error) error
Click to show internal directories.
Click to hide internal directories.