-
Notifications
You must be signed in to change notification settings - Fork 434
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-778] Calculate cost for GCP Redis instances #1227
Conversation
Signed-off-by: titanventura <aswath7862001@gmail.com>
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.
- Encapsulate the price list fetching logic in a function
- fix the magic numbers, declare them glabally
providers/gcp/redis/instances.go
Outdated
} | ||
|
||
func getStartTime(createTime, now time.Time) time.Time { | ||
firstOfCurrentMonth := time.Date(now.Year(), now.Month(), 1, 0, 0, 0, 0, now.Location()) |
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.
Could you check with other places in the code and see if this is the same? I think we use UTC time.
Also, it'd be great if we had a util function for doing this repetitive task, since we do it across all the providers.
…etching into a function Signed-off-by: titanventura <aswath7862001@gmail.com>
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.
Keeping a note that we need to make a few utils for GCP as well when we extend GCP support
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
Fixes #778
Problem
Currently the cost for GCP redis instances are not calculated.
Changes Made
Notes
Need to test with actual GCP account
Checklist
Reviewers
@jakepage91 @mlabouardy