-
Notifications
You must be signed in to change notification settings - Fork 554
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
Sth/expand cloud cost properties #2861
Sth/expand cloud cost properties #2861
Conversation
Signed-off-by: Sean Holcomb <seanholcomb@gmail.com>
19b844f
to
e686b32
Compare
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.
Need an OC maintainer to approve but this looks good to me apart from maybe a missed string alias.
core/pkg/filter/cloudcost/fields.go
Outdated
FieldAccountID CloudCostField = CloudCostField(fieldstrings.FieldAccountID) | ||
FieldAccountName CloudCostField = CloudCostField(fieldstrings.FieldAccountName) | ||
FieldRegionID CloudCostField = CloudCostField(fieldstrings.FieldRegionID) | ||
FieldAvailabilityZone = CloudCostField(fieldstrings.FieldAvailabilityZone) |
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.
Is there a particular reason why FieldAvailabilityZone
doesnt have string alias
InvoiceEntityName string `json:"invoiceEntityName,omitempty"` // @bingen:field[version=3] | ||
RegionID string `json:"regionID,omitempty"` // @bingen:field[version=3] | ||
AvailabilityZone string `json:"availabilityZone,omitempty"` // @bingen:field[version=3] | ||
Service string `json:"service,omitempty"` |
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'm glad you're putting this into practice. I think for years, I've been preaching "add new fields to the end" but realized recently that this wasn't a requirement after the backwards compatibility updates.
Although, once this ordering is established, you can't rearrange afterwards. That's the only remaining nuance.
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.
Looks great to me!
Signed-off-by: Sean Holcomb <seanholcomb@gmail.com>
* Update Cloud Cost with new properteis Signed-off-by: Sean Holcomb <seanholcomb@gmail.com> * Final changes and test Signed-off-by: Sean Holcomb <seanholcomb@gmail.com> --------- Signed-off-by: Sean Holcomb <seanholcomb@gmail.com>
What does this PR change?
This PR adds 4 new properties to the Cloud Cost type that can be aggregated or filtered on. These new fields line up with FOCUS Spec fields bringing Cloud Costs closer to the spec The fields are:
To go along with these new properties, each billing integration implementation has been updated to ingest values for them if available. When values are not available for BillingEntityName or AccountName the value from BillingEntityID and AccountID are used respectively. If there is no RegionID or AvailabilityZone value then the properties are left blank.
This Pr also contains fixes for the S3Select integration for AWS.
Does this PR relate to any other PRs?
How will this PR impact users?
Does this PR address any GitHub or Zendesk issues?
How was this PR tested?
Does this PR require changes to documentation?
Have you labeled this PR and its corresponding Issue as "next release" if it should be part of the next OpenCost release? If not, why not?