Documentation ¶
Index ¶
- func BuildConfigConstraintLabels(object client.Object, configSpecs []appsv1.ComponentConfigSpec)
- func BuildConfigTemplateAnnotations(object client.Object, synthesizedComp *component.SynthesizedComponent)
- 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 GetConfigManagerGRPCPort(containers []corev1.Container) (int32, error)
- func InjectEnvEnabled(spec appsv1.ComponentConfigSpec) bool
- func NewConfigReconcileTask(resourceCtx *ResourceCtx, cluster *appsv1.Cluster, component *appsv1.Component, ...) *configOperator
- func NewCreatePipeline(ctx ReconcileCtx) *pipeline
- func NewReconcilePipeline(ctx ReconcileCtx, item appsv1alpha1.ConfigurationItemDetail, ...) *updatePipeline
- func SyncEnvSourceObject(configSpec appsv1.ComponentConfigSpec, cmObj *corev1.ConfigMap, ...) error
- func UpdateCMConfigSpecLabels(cm *corev1.ConfigMap, configSpec appsv1.ComponentConfigSpec)
- func UpdateConfigPayload(config *appsv1alpha1.ConfigurationSpec, ...) (bool, error)
- type Fetcher
- type ReconcileCtx
- type ResourceCtx
- type ResourceDefinition
- type ResourceFetcher
- func (r *ResourceFetcher[T]) Cluster() *T
- func (r *ResourceFetcher[T]) Complete() error
- func (r *ResourceFetcher[T]) ComponentAndComponentDef() *T
- func (r *ResourceFetcher[T]) ComponentSpec() *T
- func (r *ResourceFetcher[T]) ConfigConstraints(ccName string) *T
- func (r *ResourceFetcher[T]) ConfigMap(configSpec string) *T
- func (r *ResourceFetcher[T]) Configuration() *T
- func (r *ResourceFetcher[T]) Init(ctx *ResourceCtx, object *T) *T
- func (r *ResourceFetcher[T]) Wrap(fn func() error) (ret *T)
- type TemplateMerger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConfigConstraintLabels ¶ added in v0.9.0
func BuildConfigConstraintLabels(object client.Object, configSpecs []appsv1.ComponentConfigSpec)
BuildConfigConstraintLabels builds config constraints labels for object
func BuildConfigTemplateAnnotations ¶ added in v0.9.0
func BuildConfigTemplateAnnotations(object client.Object, synthesizedComp *component.SynthesizedComponent)
BuildConfigTemplateAnnotations builds config template annotations for object
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 *appsv1beta1.ConfigConstraint, configSpec appsv1.ComponentConfigSpec) (map[string]string, error)
func GetConfigManagerGRPCPort ¶ added in v0.8.0
func InjectEnvEnabled ¶
func InjectEnvEnabled(spec appsv1.ComponentConfigSpec) bool
func NewConfigReconcileTask ¶
func NewCreatePipeline ¶
func NewCreatePipeline(ctx ReconcileCtx) *pipeline
func NewReconcilePipeline ¶
func NewReconcilePipeline(ctx ReconcileCtx, item appsv1alpha1.ConfigurationItemDetail, itemStatus *appsv1alpha1.ConfigurationItemDetailStatus, configSpec *appsv1.ComponentConfigSpec) *updatePipeline
func SyncEnvSourceObject ¶
func SyncEnvSourceObject(configSpec appsv1.ComponentConfigSpec, cmObj *corev1.ConfigMap, cc *appsv1beta1.ConfigConstraintSpec, cli client.Client, ctx context.Context, cluster *appsv1.Cluster, component *component.SynthesizedComponent) error
func UpdateCMConfigSpecLabels ¶
func UpdateCMConfigSpecLabels(cm *corev1.ConfigMap, configSpec appsv1.ComponentConfigSpec)
func UpdateConfigPayload ¶ added in v0.9.0
func UpdateConfigPayload(config *appsv1alpha1.ConfigurationSpec, component *component.SynthesizedComponent) (bool, error)
UpdateConfigPayload updates the configuration payload
Types ¶
type Fetcher ¶ added in v0.8.2
type Fetcher struct { ResourceFetcher[Fetcher] }
func NewResourceFetcher ¶ added in v0.8.2
func NewResourceFetcher(resourceCtx *ResourceCtx) *Fetcher
type ReconcileCtx ¶
type ResourceCtx ¶ added in v0.8.2
type ResourceDefinition ¶
type ResourceFetcher ¶ added in v0.8.2
type ResourceFetcher[T any] struct { *ResourceCtx ClusterObj *appsv1.Cluster ComponentObj *appsv1.Component ComponentDefObj *appsv1.ComponentDefinition ClusterComObj *appsv1.ClusterComponentSpec ConfigMapObj *corev1.ConfigMap ConfigurationObj *appsv1alpha1.Configuration ConfigConstraintObj *appsv1beta1.ConfigConstraint // contains filtered or unexported fields }
func (*ResourceFetcher[T]) Cluster ¶ added in v0.8.2
func (r *ResourceFetcher[T]) Cluster() *T
func (*ResourceFetcher[T]) Complete ¶ added in v0.8.2
func (r *ResourceFetcher[T]) Complete() error
func (*ResourceFetcher[T]) ComponentAndComponentDef ¶ added in v0.9.0
func (r *ResourceFetcher[T]) ComponentAndComponentDef() *T
func (*ResourceFetcher[T]) ComponentSpec ¶ added in v0.9.0
func (r *ResourceFetcher[T]) ComponentSpec() *T
func (*ResourceFetcher[T]) ConfigConstraints ¶ added in v0.8.2
func (r *ResourceFetcher[T]) ConfigConstraints(ccName string) *T
func (*ResourceFetcher[T]) ConfigMap ¶ added in v0.8.2
func (r *ResourceFetcher[T]) ConfigMap(configSpec string) *T
func (*ResourceFetcher[T]) Configuration ¶ added in v0.8.2
func (r *ResourceFetcher[T]) Configuration() *T
func (*ResourceFetcher[T]) Init ¶ added in v0.8.2
func (r *ResourceFetcher[T]) Init(ctx *ResourceCtx, object *T) *T
func (*ResourceFetcher[T]) Wrap ¶ added in v0.8.2
func (r *ResourceFetcher[T]) Wrap(fn func() error) (ret *T)
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 appsv1.ConfigTemplateExtension, ctx context.Context, cli client.Client, builder *configTemplateBuilder, configSpec appsv1.ComponentConfigSpec, ccSpec *appsv1beta1.ConfigConstraintSpec) (TemplateMerger, error)
Click to show internal directories.
Click to hide internal directories.