-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix the # for ELB #76
Conversation
collector/aws/elb.go
Outdated
Field: awsClient.String("group"), | ||
Value: awsClient.String("ELB:Balancer"), | ||
Field: awsClient.String("groupDescription"), | ||
Value: awsClient.String("LoadBalancer hourly usage by Classic Load Balancer"), |
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.
There is not better way to filter the price?
I not like the way that we are filter by *description
field
collector/aws/elbv2.go
Outdated
@@ -89,10 +93,13 @@ func (el *ELBV2Manager) Detect() ([]DetectedELBV2, error) { | |||
now := time.Now() | |||
|
|||
for _, instance := range instances { | |||
var cloudWatchNameSpace string | |||
if cloudWatchNS, found := loadBalancerCWNameSpace[*instance.Type]; found { |
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.
what are you expecting to happen when the instance type not found in loadBalancerCWNameSpace
collector/aws/elbv2.go
Outdated
func (el *ELBV2Manager) Get#FilterInput() *#.GetProductsInput { | ||
func (el *ELBV2Manager) Get#FilterInput(loadbalancer *elbv2.LoadBalancer) *#.GetProductsInput { | ||
|
||
var loadBalancerProductFamily string |
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.
In this case you already know which type is it (you have a logic that take from loadBalancerCWNameSpace
).
is incase loadBalancerCWNameSpace == map[string]string
you can change it to
map[string]strcut
then you can remove this switch case
collector/aws/elbv2.go
Outdated
Type: awsClient.String("TERM_MATCH"), | ||
Field: awsClient.String("group"), | ||
Value: awsClient.String("ELB:Balancer"), | ||
Field: awsClient.String("groupDescription"), |
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.
same question in elb.go
@cregev fix the conflicts |
Codecov Report
@@ Coverage Diff @@
## master #76 +/- ##
==========================================
+ Coverage 79.83% 80.05% +0.21%
==========================================
Files 35 35
Lines 2624 2652 +28
==========================================
+ Hits 2095 2123 +28
Misses 434 434
Partials 95 95
Continue to review full report at Codecov.
|
What type of PR is this?
Bug
What this PR does / why we need it:
Fix the # of ELB
Which issue(s) this PR fixes (if exists):
Today we are calculating the price of ELB as an Application Load Balancer which is wrong.