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

Rename up space billing get to export and fix event tags #367

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

branden
Copy link
Contributor

@branden branden commented Aug 25, 2023

Description of your changes

This renames up space billing get to up space billing export and adjusts output accordingly. It also updates the name of the event tag identifying the control plane from mcp_id to mxp_id.

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

branden@crateria up % make build
<snip>
branden@crateria up % ./_output/bin/darwin_arm64/up space billing export --provider gcp --bucket mcp-usage-localdev --account branden --billing-custom 2023-08-24/2023-08-24
Exporting billing report for Upbound account branden from 2023-08-24T00:00:00Z to 2023-08-25T00:00:00Z.

Reading usage data from storage...
Provider: gcp
Bucket: mcp-usage-localdev

Billing report saved to /Users/branden/Projects/up/upbound_billing_report.tgz
branden@crateria up % tar -xzf upbound_billing_report.tgz
branden@crateria up % cat report/meta.json
{
  "account": "branden",
  "time_range": {
    "start": "2023-08-24T00:00:00Z",
    "end": "2023-08-25T00:00:00Z"
  },
  "collected_at": "2023-08-25T12:55:53.174021-07:00"
}%
branden@crateria up % jq '. | length' < report/usage.json
23
branden@crateria up % jq '.[0]' < report/usage.json
{
  "name": "max_resource_count_per_gvk_per_mxp",
  "tags": {
    "customresource_group": "kubernetes.crossplane.io",
    "customresource_version": "v1alpha1",
    "customresource_kind": "Object",
    "upbound_account": "branden",
    "mxp_id": "7333a38e-4577-4c0b-99da-4962fb66de6d"
  },
  "timestamp": "2023-08-24T01:00:00Z",
  "timestamp_end": "2023-08-24T02:00:00Z",
  "value": 2
}
branden@crateria up %

@branden branden requested a review from a team August 25, 2023 20:00
@branden branden changed the title Rename up space billing get to export and fix event tags Rename up space billing get to export and fix event tags Aug 25, 2023
@branden branden merged commit 62b427b into upbound:main Aug 25, 2023
6 checks passed
@branden branden deleted the get-to-export branch August 25, 2023 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants