[usage] Add billInstancesAfter
config setting
#11882
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add a new config setting to the usage component config setting to better support the rollout of usage based pricing.
The
billInstancesAfter
setting defines the date after which instances should be considered for billing - instances started beforebillInstancesAfter
will never be considered by the billing controller.Related Issue(s)
Part of #10937
How to test
Unit tests for the billing controller.
For an end-to-end test do this in the preview environment:
Join the Gitpod team: https://af-no-bill390c0e761d.preview.gitpod-dev.com/teams/join?inviteId=f35adc3b-720f-4406-85ec-101628b587bc
Edit the usage configmap to change
billInstancesAfter
:By changing the date, restarting the
usage
pod and starting workspaces you can see that workspaces are either included or not in the Stripe invoice for the Gitpod team (find it in the Stripe dashboard).Release Notes
Documentation
Werft options: