parameters

package
v1.1.0-alpha.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2025 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsSidecarContainerImage

func AsSidecarContainerImage(toolImage parametersv1alpha1.ToolConfig) bool

func BuildReloadActionContainer

func BuildReloadActionContainer(resourceCtx *render.ResourceCtx, cluster *appsv1.Cluster, synthesizedComp *component.SynthesizedComponent, cmpd *appsv1.ComponentDefinition) error

BuildReloadActionContainer build the configmgr sidecar container and update it into PodSpec if configuration reload option is on

func CheckAndPatchPayload

func CheckAndPatchPayload(item *parametersv1alpha1.ConfigTemplateItemDetail, payloadID string, payload interface{}) (bool, error)

func FindParameterSchema

func FindParameterSchema[T any](parametersMap map[string]T, paramKey string) (T, bool)

func GetUpdatedParametersReconciledPhase

GetUpdatedParametersReconciledPhase gets the configuration phase

func HasValidParameterTemplate

func HasValidParameterTemplate(pcr *parametersv1alpha1.ParamConfigRenderer) bool

func IsApplyUpdatedParameters

func IsApplyUpdatedParameters(configMap *corev1.ConfigMap, item parametersv1alpha1.ConfigTemplateItemDetail) bool

IsApplyUpdatedParameters checks if the configuration is changed

func IsFailedPhase

func IsFailedPhase(phase parametersv1alpha1.ParameterPhase) bool

func IsParameterFinished

func IsParameterFinished(phase parametersv1alpha1.ParameterPhase) bool

func IsRerender

IsRerender checks if the configuration template is changed

func MergeAndValidateConfigs

func MergeAndValidateConfigs(baseConfigs map[string]string,
	updatedParams []core.ParamPairs,
	paramsDefs []*parametersv1alpha1.ParametersDefinition,
	configDescs []parametersv1alpha1.ComponentConfigDescription) (map[string]string, error)

MergeAndValidateConfigs merges and validates configuration files

func NewValueManager

func NewValueManager(paramsDefs []*parametersv1alpha1.ParametersDefinition, configs []parametersv1alpha1.ComponentConfigDescription) *valueManager

func ParametersDefinitionTerminalPhases

func ParametersDefinitionTerminalPhases(status parametersv1alpha1.ParametersDefinitionStatus, generation int64) bool

func ParametersDrivenConfigRenderTerminalPhases

func ParametersDrivenConfigRenderTerminalPhases(status parametersv1alpha1.ParamConfigRendererStatus, generation int64) bool

func ParametersTerminalPhases

func ParametersTerminalPhases(status parametersv1alpha1.ParameterStatus, generation int64) bool

func ResolveComponentTemplate

func ResolveComponentTemplate(ctx context.Context, reader client.Reader, cmpd *appsv1.ComponentDefinition) (map[string]*corev1.ConfigMap, error)

func ResolveConfigParameterSchema

func ResolveConfigParameterSchema(paramDef *parametersv1alpha1.ParametersDefinition, configTemplate *appsv1.ComponentFileTemplate) map[string]*ParameterMeta

func ResolveReloadServerGRPCPort

func ResolveReloadServerGRPCPort(containers []corev1.Container) (int32, error)

func ResolveShardingReference

func ResolveShardingReference(ctx context.Context, reader client.Reader, comp *appsv1.Component) (*appsv1.ClusterSharding, error)

func ResourcesPayloadForComponent

func ResourcesPayloadForComponent(resources corev1.ResourceRequirements) any

func UpdateConfigPayload

UpdateConfigPayload updates the configuration payload

Types

type Fetcher

type Fetcher struct {
	ResourceFetcher[Fetcher]
}

func NewResourceFetcher

func NewResourceFetcher(resourceCtx *render.ResourceCtx) *Fetcher

type MutateFunc

type MutateFunc func(dest, expected *parametersv1alpha1.ConfigTemplateItemDetail)

type ParameterMeta

type ParameterMeta struct {
	FileName           string
	ConfigTemplateName string
}

type ResourceFetcher

type ResourceFetcher[T any] struct {
	*render.ResourceCtx

	ClusterObj      *appsv1.Cluster
	ComponentObj    *appsv1.Component
	ComponentDefObj *appsv1.ComponentDefinition
	ClusterComObj   *appsv1.ClusterComponentSpec

	ConfigMapObj          *corev1.ConfigMap
	ComponentParameterObj *parametersv1alpha1.ComponentParameter
	// contains filtered or unexported fields
}

func (*ResourceFetcher[T]) Cluster

func (r *ResourceFetcher[T]) Cluster() *T

func (*ResourceFetcher[T]) Complete

func (r *ResourceFetcher[T]) Complete() error

func (*ResourceFetcher[T]) ComponentAndComponentDef

func (r *ResourceFetcher[T]) ComponentAndComponentDef() *T

func (*ResourceFetcher[T]) ComponentParameter

func (r *ResourceFetcher[T]) ComponentParameter() *T

func (*ResourceFetcher[T]) ComponentSpec

func (r *ResourceFetcher[T]) ComponentSpec() *T

func (*ResourceFetcher[T]) ConfigMap

func (r *ResourceFetcher[T]) ConfigMap(configSpec string) *T

func (*ResourceFetcher[T]) Init

func (r *ResourceFetcher[T]) Init(ctx *render.ResourceCtx, object *T) *T

func (*ResourceFetcher[T]) Wrap

func (r *ResourceFetcher[T]) Wrap(fn func() error) (ret *T)

type Result

type Result struct {
	Phase      parametersv1alpha1.ParameterPhase `json:"phase"`
	Revision   string                            `json:"revision"`
	Policy     string                            `json:"policy"`
	ExecResult string                            `json:"execResult"`

	SucceedCount  int32 `json:"succeedCount"`
	ExpectedCount int32 `json:"expectedCount"`

	Retry   bool   `json:"retry"`
	Failed  bool   `json:"failed"`
	Message string `json:"message"`
}

type TemplateMerger

type TemplateMerger interface {
	// contains filtered or unexported methods
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL