Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalysisRunBuilder ¶
type AnalysisRunBuilder struct {
// contains filtered or unexported fields
}
AnalysisRunBuilder constructs AnalysisRun objects with consistent configuration.
func NewAnalysisRunBuilder ¶
func NewAnalysisRunBuilder(c client.Client, cfg Config) *AnalysisRunBuilder
NewAnalysisRunBuilder creates a new AnalysisRunBuilder with the provided client and configuration.
func (*AnalysisRunBuilder) Build ¶
func (b *AnalysisRunBuilder) Build( ctx context.Context, namespace string, cfg *kargoapi.Verification, opt ...AnalysisRunOption, ) (*rolloutsapi.AnalysisRun, error)
Build creates a new AnalysisRun from the provided verification and options.
type AnalysisRunOption ¶
type AnalysisRunOption interface {
ApplyToAnalysisRun(*AnalysisRunOptions)
}
AnalysisRunOption is an option for configuring the build of an AnalysisRun.
type AnalysisRunOptions ¶
type AnalysisRunOptions struct { NamePrefix string NameSuffix string ExtraLabels map[string]string ExtraAnnotations map[string]string Owners []Owner ExpressionConfig *ArgumentEvaluationConfig }
AnalysisRunOptions holds the options for building an AnalysisRun.
func (*AnalysisRunOptions) Apply ¶
func (o *AnalysisRunOptions) Apply(opts ...AnalysisRunOption)
Apply applies the given options to the AnalysisRunOptions.
type ArgumentEvaluationConfig ¶ added in v1.3.0
type ArgumentEvaluationConfig struct { // Env is a (nested) map of variables that can be used in the expressions. // The keys are the variable names, and the values are the variable values. // When the value itself is a map, it is considered a nested variable and // can be accessed using dot notation. e.g. `${{ foo.bar }}`. Env map[string]any // Options are the options for the expression evaluation. It can be used to // configure the behavior of the expression evaluation and the functions // available. Options []expr.Option }
ArgumentEvaluationConfig holds the configuration for the evaluation of expressions in the AnalysisRun arguments.
type Config ¶
type Config struct { // ControllerInstanceID is the unique identifier for the Argo Rollouts // controller instance. If set, any AnalysisRun created by the builder // will have this value set as a label. ControllerInstanceID string }
Config holds the configuration for the AnalysisRunBuilder.
type Owner ¶
type Owner struct { APIVersion string Kind string Reference types.NamespacedName BlockDeletion bool }
Owner represents a reference to an owner object.
type WithArgumentEvaluationConfig ¶ added in v1.3.0
type WithArgumentEvaluationConfig ArgumentEvaluationConfig
WithArgumentEvaluationConfig sets the argument evaluation configuration for the AnalysisRun. By default, the environment is empty, and only the builtin functions are available.
func (WithArgumentEvaluationConfig) ApplyToAnalysisRun ¶ added in v1.3.0
func (o WithArgumentEvaluationConfig) ApplyToAnalysisRun(opts *AnalysisRunOptions)
type WithExtraAnnotations ¶ added in v1.3.0
WithExtraAnnotations sets the extra labels for the AnalysisRun. It can be passed multiple times to add more annotations.
func (WithExtraAnnotations) ApplyToAnalysisRun ¶ added in v1.3.0
func (o WithExtraAnnotations) ApplyToAnalysisRun(opts *AnalysisRunOptions)
type WithExtraLabels ¶
WithExtraLabels sets the extra labels for the AnalysisRun. It can be passed multiple times to add more labels.
func (WithExtraLabels) ApplyToAnalysisRun ¶
func (o WithExtraLabels) ApplyToAnalysisRun(opts *AnalysisRunOptions)
type WithNamePrefix ¶
type WithNamePrefix string
WithNamePrefix sets the name prefix for the AnalysisRun. If it is longer than maxNamePrefixLength, it will be truncated.
func (WithNamePrefix) ApplyToAnalysisRun ¶
func (o WithNamePrefix) ApplyToAnalysisRun(opts *AnalysisRunOptions)
type WithNameSuffix ¶
type WithNameSuffix string
WithNameSuffix sets the name suffix for the AnalysisRun. If it is longer than maxNameSuffixLength, it will be truncated.
func (WithNameSuffix) ApplyToAnalysisRun ¶
func (o WithNameSuffix) ApplyToAnalysisRun(opts *AnalysisRunOptions)
type WithOwner ¶
type WithOwner Owner
WithOwner sets the owner for the AnalysisRun. It can be passed multiple times to add more owners.
func (WithOwner) ApplyToAnalysisRun ¶
func (o WithOwner) ApplyToAnalysisRun(opts *AnalysisRunOptions)