Sketch out cluster generator in the CRD, and generator interface #2
Conversation
// The expected / desired list of Applications is returned, it then needs to be reconciled | ||
// against the current state of the Applications in the cluster. | ||
GenerateApplications(appSet *argoprojiov1alpha1.ApplicationSet) ([]argov1alpha1.Application, error) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it might be helpful to break this into an interface and implement for each type of generator, to help us work without causing git conflicts as much as possible.
Returns the Applications (desired state) to help with unit testing, something else will need to reconcile these with the actual state of the Applications currently.
Common code can be shared amongst generators using functions in this package, but my suspicion is the implementations of each generator will be unique enough to isolate them as separate implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
You can wait for #1 to be merged, and your base code will also change.
6bb6e7b
to
75f58c7
Compare
75f58c7
to
e1a3dc4
Compare
Rebased onto latest changed and ready for review. |
e1a3dc4
to
391e4de
Compare
What's your opinion about this pr @jessesuen |
Builds on #1 to add a field for cluster generator with label selector.
Fixes the main.go compile problem, and adds dist/ to .gitignore.
Adds a simple interface for generators and two empty implementations for list and cluster.