parameters

package
v1.2.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeParameterOverlay

func DecodeParameterOverlay(parameters map[string]*string) map[string]*string

func EncodeParameterOverlay

func EncodeParameterOverlay(parameters map[string]*string) map[string]*string

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(configs []parametersv1alpha1.ComponentConfigDescription) bool

func IsApplyUpdatedParameters

func IsApplyUpdatedParameters(configMap *corev1.ConfigMap, item parametersv1alpha1.ConfigTemplateItemDetail, compGeneration int64) 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 LegacyConfigManagerRequiredForCluster

func LegacyConfigManagerRequiredForCluster(cluster *appsv1.Cluster) (bool, error)

func LegacyConfigManagerRequiredForParamsDefs

func LegacyConfigManagerRequiredForParamsDefs(paramsDefs []*parametersv1alpha1.ParametersDefinition) bool

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 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

Types

type Fetcher

type Fetcher struct {
	ResourceFetcher[Fetcher]
}

func NewResourceFetcher

func NewResourceFetcher(resourceCtx *render.ResourceCtx) *Fetcher

type LegacyConfigManagerRequirementState

type LegacyConfigManagerRequirementState string
const (
	LegacyConfigManagerRequirementUnknown LegacyConfigManagerRequirementState = "unknown"
	LegacyConfigManagerRequirementKeep    LegacyConfigManagerRequirementState = "keep"
	LegacyConfigManagerRequirementCleanup LegacyConfigManagerRequirementState = "cleanup"
)

func LegacyConfigManagerRequirementStateForCluster

func LegacyConfigManagerRequirementStateForCluster(cluster *appsv1.Cluster) (LegacyConfigManagerRequirementState, error)

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, ClusterObjCopy *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