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

Move reconcile logic into OnUpdate #162

Merged
merged 1 commit into from
Aug 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ func (ac *ALBController) OnUpdate(ingressConfiguration ingress.Configuration) er
awsutil.ManagedIngresses.Set(float64(len(ALBIngresses)))
// Update the list of ALBIngresses known to the ALBIngress controller to the newly generated list.
ac.ALBIngresses = ALBIngresses

// Sync the state, resulting in creation, modify, delete, or no action, for every ALBIngress
// instance known to the ALBIngress controller.
for _, ALBIngress := range ac.ALBIngresses {
ALBIngress.Reconcile(ac.disableRoute53)
}

return nil
}

Expand All @@ -112,19 +119,6 @@ func (ac ALBController) validIngress(i *extensions.Ingress) bool {
return false
}

// Reload executes the state synchronization for our ingresses
func (ac *ALBController) Reload(data []byte) ([]byte, bool, error) {
awsutil.ReloadCount.Add(float64(1))

// Sync the state, resulting in creation, modify, delete, or no action, for every ALBIngress
// instance known to the ALBIngress controller.
for _, ALBIngress := range ac.ALBIngresses {
ALBIngress.Reconcile(ac.disableRoute53)
}

return []byte(""), true, nil
}

// OverrideFlags configures optional override flags for the ingress controller
func (ac *ALBController) OverrideFlags(flags *pflag.FlagSet) {
}
Expand Down