Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Different deployment update strategy for different event sources #755

Merged
merged 6 commits into from
Jul 18, 2020

Conversation

whynowy
Copy link
Member

@whynowy whynowy commented Jul 17, 2020

  1. Use recreate strategy for some of the eventsources deployment update.
  2. Now EventSource allows multiple types of sources defined in one spec, following the rules:
    a.) Event source with rollingUpdate and recreate are not allowed in one EventSource object - Otherwise when the EventSource is updated, there will be downtime for those rollingUpdate type event sources such as webhook.
    b.) Event name (the map key) needs to be unique in one EventSource object, even different type of event source can not use same name - Because we use EventSourceName and EventName in Sensor as dependency.
    c.) rollingUpdate types use replicas defined in the spec, defaults to 1;
    d.) recreate ignores replica field in the spec, it always uses 1
  3. Added missing Resource type EventSource.
  4. Fixed a bug for HDFS event source - a bug of configMapSelector to envFrom conversion.
  5. Added eventsource-controller test cases.

Closes #752

var (
// RecreateStrategyEventSources refers to the list of event source types
// that need to use Recreate strategy for its Deployment
RecreateStrategyEventSources = []EventSourceType{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VaibhavPage - Could you point me the right types here?

@whynowy whynowy requested a review from VaibhavPage July 17, 2020 22:04
@@ -76,7 +76,7 @@ func main() {
}
// A controller with DefaultControllerRateLimiter
c, err := controller.New(eventsource.ControllerName, mgr, controller.Options{
Reconciler: eventsource.NewReconciler(mgr.GetClient(), mgr.GetScheme(), namespace, eventSourceImage, log.WithName("reconciler")),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This namespace is never used, remove it.

Copy link
Contributor

@VaibhavPage VaibhavPage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@whynowy whynowy merged commit 2363cc1 into argoproj:master Jul 18, 2020
@whynowy whynowy deleted the es_strategy branch July 18, 2020 23:47
juliev0 pushed a commit to juliev0/argo-events that referenced this pull request Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EventSource deployment strategy and replicas control
2 participants