Documentation ¶
Index ¶
- Constants
- Variables
- type ClusterGenerator
- func (g *ClusterGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, ...) ([]map[string]string, error)
- func (g *ClusterGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
- func (g *ClusterGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
- type DuckTypeGenerator
- func (g *DuckTypeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, ...) ([]map[string]string, error)
- func (g *DuckTypeGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
- func (g *DuckTypeGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
- type Generator
- func GetRelevantGenerators(requestedGenerator *argoprojiov1alpha1.ApplicationSetGenerator, ...) []Generator
- func NewClusterGenerator(c client.Client, ctx context.Context, clientset kubernetes.Interface, ...) Generator
- func NewDuckTypeGenerator(ctx context.Context, dynClient dynamic.Interface, ...) Generator
- func NewGitGenerator(repos services.Repos) Generator
- func NewListGenerator() Generator
- func NewMatrixGenerator(supportedGenerators map[string]Generator) Generator
- func NewMergeGenerator(supportedGenerators map[string]Generator) Generator
- func NewPullRequestGenerator(client client.Client) Generator
- func NewSCMProviderGenerator(client client.Client) Generator
- type GitGenerator
- func (g *GitGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, ...) ([]map[string]string, error)
- func (g *GitGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
- func (g *GitGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
- type ListGenerator
- func (g *ListGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, ...) ([]map[string]string, error)
- func (g *ListGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
- func (g *ListGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
- type MatrixGenerator
- func (m *MatrixGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, ...) ([]map[string]string, error)
- func (m *MatrixGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
- func (m *MatrixGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
- type MergeGenerator
- func (m *MergeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, ...) ([]map[string]string, error)
- func (m *MergeGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
- func (m *MergeGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
- type PullRequestGenerator
- func (g *PullRequestGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, ...) ([]map[string]string, error)
- func (g *PullRequestGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
- func (g *PullRequestGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
- type SCMProviderGenerator
- func (g *SCMProviderGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, ...) ([]map[string]string, error)
- func (g *SCMProviderGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
- func (g *SCMProviderGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
- type TransformResult
Constants ¶
const ( ArgoCDSecretTypeLabel = "argocd.argoproj.io/secret-type" ArgoCDSecretTypeCluster = "cluster" )
const (
DefaultPullRequestRequeueAfterSeconds = 30 * time.Minute
)
const (
DefaultRequeueAfterSeconds = 3 * time.Minute
)
DefaultRequeueAfterSeconds is used when GetRequeueAfter is not specified, it is the default time to wait before the next reconcile loop
const (
DefaultSCMProviderRequeueAfterSeconds = 30 * time.Minute
)
Variables ¶
var ( ErrMoreThanTwoGenerators = errors.New("found more than two generators, Matrix support only two") ErrLessThanTwoGenerators = errors.New("found less than two generators, Matrix support only two") ErrMoreThenOneInnerGenerators = errors.New("found more than one generator in matrix.Generators") )
var ( ErrLessThanTwoGeneratorsInMerge = errors.New("found less than two generators, Merge requires two or more") ErrNoMergeKeys = errors.New("no merge keys were specified, Merge requires at least one") ErrNonUniqueParamSets = errors.New("the parameters from a generator were not unique by the given mergeKeys, Merge requires all param sets to be unique") )
var EmptyAppSetGeneratorError = errors.New("ApplicationSet is empty")
var NoRequeueAfter time.Duration
Functions ¶
This section is empty.
Types ¶
type ClusterGenerator ¶
ClusterGenerator generates Applications for some or all clusters registered with ArgoCD.
func (*ClusterGenerator) GenerateParams ¶
func (g *ClusterGenerator) GenerateParams( appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, _ *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error)
func (*ClusterGenerator) GetRequeueAfter ¶
func (g *ClusterGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
func (*ClusterGenerator) GetTemplate ¶
func (g *ClusterGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
type DuckTypeGenerator ¶
type DuckTypeGenerator struct {
// contains filtered or unexported fields
}
DuckTypeGenerator generates Applications for some or all clusters registered with ArgoCD.
func (*DuckTypeGenerator) GenerateParams ¶
func (g *DuckTypeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, _ *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error)
func (*DuckTypeGenerator) GetRequeueAfter ¶
func (g *DuckTypeGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
func (*DuckTypeGenerator) GetTemplate ¶
func (g *DuckTypeGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
type Generator ¶
type Generator interface { // GenerateParams interprets the ApplicationSet and generates all relevant parameters for the application template. // The expected / desired list of parameters is returned, it then will be render and reconciled // against the current state of the Applications in the cluster. GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) // GetRequeueAfter is the the generator can controller the next reconciled loop // In case there is more then one generator the time will be the minimum of the times. // In case NoRequeueAfter is empty, it will be ignored GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration // GetTemplate returns the inline template from the spec if there is any, or an empty object otherwise GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate }
Generator defines the interface implemented by all ApplicationSet generators.
func GetRelevantGenerators ¶
func GetRelevantGenerators(requestedGenerator *argoprojiov1alpha1.ApplicationSetGenerator, generators map[string]Generator) []Generator
func NewClusterGenerator ¶
func NewDuckTypeGenerator ¶
func NewGitGenerator ¶
func NewListGenerator ¶
func NewListGenerator() Generator
func NewMatrixGenerator ¶
func NewMergeGenerator ¶
NewMergeGenerator returns a MergeGenerator which allows the given supportedGenerators as child generators.
func NewPullRequestGenerator ¶
func NewSCMProviderGenerator ¶
type GitGenerator ¶
type GitGenerator struct {
// contains filtered or unexported fields
}
func (*GitGenerator) GenerateParams ¶
func (g *GitGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, _ *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error)
func (*GitGenerator) GetRequeueAfter ¶
func (g *GitGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
func (*GitGenerator) GetTemplate ¶
func (g *GitGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
type ListGenerator ¶
type ListGenerator struct { }
func (*ListGenerator) GenerateParams ¶
func (g *ListGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, _ *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error)
func (*ListGenerator) GetRequeueAfter ¶
func (g *ListGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
func (*ListGenerator) GetTemplate ¶
func (g *ListGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
type MatrixGenerator ¶
type MatrixGenerator struct {
// contains filtered or unexported fields
}
func (*MatrixGenerator) GenerateParams ¶
func (m *MatrixGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error)
func (*MatrixGenerator) GetRequeueAfter ¶
func (m *MatrixGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
func (*MatrixGenerator) GetTemplate ¶
func (m *MatrixGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
type MergeGenerator ¶
type MergeGenerator struct {
// contains filtered or unexported fields
}
func (*MergeGenerator) GenerateParams ¶
func (m *MergeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error)
GenerateParams gets the params produced by the MergeGenerator.
func (*MergeGenerator) GetRequeueAfter ¶
func (m *MergeGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
func (*MergeGenerator) GetTemplate ¶
func (m *MergeGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
GetTemplate gets the Template field for the MergeGenerator.
type PullRequestGenerator ¶
type PullRequestGenerator struct {
// contains filtered or unexported fields
}
func (*PullRequestGenerator) GenerateParams ¶
func (g *PullRequestGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error)
func (*PullRequestGenerator) GetRequeueAfter ¶
func (g *PullRequestGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
func (*PullRequestGenerator) GetTemplate ¶
func (g *PullRequestGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
type SCMProviderGenerator ¶
type SCMProviderGenerator struct {
// contains filtered or unexported fields
}
func (*SCMProviderGenerator) GenerateParams ¶
func (g *SCMProviderGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error)
func (*SCMProviderGenerator) GetRequeueAfter ¶
func (g *SCMProviderGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration
func (*SCMProviderGenerator) GetTemplate ¶
func (g *SCMProviderGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
type TransformResult ¶
type TransformResult struct { Params []map[string]string Template argoprojiov1alpha1.ApplicationSetTemplate }
func Transform ¶
func Transform(requestedGenerator argoprojiov1alpha1.ApplicationSetGenerator, allGenerators map[string]Generator, baseTemplate argoprojiov1alpha1.ApplicationSetTemplate, appSet *argoprojiov1alpha1.ApplicationSet) ([]TransformResult, error)
Transform a spec generator to list of paramSets and a template