-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Rules controller #664
Rules controller #664
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bigkraig The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
internal/alb/rs/rules.go
Outdated
if i < 0 { | ||
return nil, fmt.Errorf("failed to find a target group associated with a rule. This should not be possible. Rule: %s, ARN: %s", awsutil.Prettify(r.RuleArn), *r.Actions[0].TargetGroupArn) | ||
func (rs *Rules) TargetGroupArns() (result []string) { | ||
for _, rule := range rs.Rules { |
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 don't think we need to reply these arns to know which target group we need.
Since when we build these target groups, we already know it. (this can be changed later when we refactoring more)
internal/alb/rs/rules.go
Outdated
if rule.rs.current == nil { | ||
continue TG | ||
func (c *rulesController) getCurrentRules(listenerArn string) (results []*Rule, err error) { | ||
p := request.Pagination{ |
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'd rather not deal with terrible aws pagination api in application logic(which makes the unit test/code logic hard).
Instead, i'd prefer to create a wrapper api in elbv2 that returns a list of rules directly.
/lgtm |
i guess you have to close & reopen this pr to trigger travis again 😸 |
9663362
to
fd99b4a
Compare
@M00nF1sh I rebased it on master but its going to need another lgtm |
/lgtm |
/lgtm |
… redirect and would create a redirect loop
734d607
to
62002db
Compare
/lgtm |
/override coverage/coveralls |
No description provided.