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 Owners []Owner }
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 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 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)