-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[usage] Configure Stripe Price IDs through installer #14124
Conversation
started the job as gitpod-build-mp-usage-configure-price-ids.1 because the annotations in the pull request description changed |
f769968
to
342bcc4
Compare
Thanks for this, @easyCZ! How do I preview the configmap? |
In preview, |
@@ -277,6 +277,12 @@ EOF`); | |||
exec(`yq w -i ${this.options.installerConfigPath} experimental.webapp.usage.defaultSpendingLimit.minForUsersOnStripe 1000`, { slice: slice }) | |||
exec(`yq w -i ${this.options.installerConfigPath} experimental.webapp.usage.creditsPerMinuteByWorkspaceClass['default'] 0.1666666667`, { slice: slice }) | |||
exec(`yq w -i ${this.options.installerConfigPath} experimental.webapp.usage.creditsPerMinuteByWorkspaceClass['gitpodio-internal-xl'] 0.3333333333`, { slice: slice }) | |||
|
|||
// Configure Price IDs | |||
exec(`yq w -i ${this.options.installerConfigPath} experimental.webapp.stripe.individualUsagePriceIds['EUR'] price_1LmYVxGadRXm50o3AiLq0Qmo`, { slice: slice }) |
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 see empty strings in the installer config when I ran kubectl get configmap usage -o yaml
, but I expected these ones for preview?
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.
Ah, it's gonna be because changes to .werft
don't get triggered by PRs. I need to manually trigger.
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've triggered the build. If you look at the preview env now, it does contain the config.
Sorry, this one always catches me out and I forgot to do this for the PR when I created it, I had it on a different branch before.
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.
Thanks, looks good!
type StripePriceIDs struct { | ||
EUR string `json:"eur"` | ||
USD string `json:"usd"` | ||
} | ||
|
||
type StripeConfig struct { | ||
IndividualUsagePriceIDs StripePriceIDs `json:"individualUsagePriceIds"` | ||
TeamUsagePriceIDs StripePriceIDs `json:"teamUsagePriceIds"` | ||
} | ||
|
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.
Hey Milan, I've just joined the team so I'm still catching up on decisions around the installer 😬
How do we decide if things go to "experimental" or not? maybe @mrsimonemms could help clarifying as well?
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.
@ArthurSens as a general rule, anything that's in experimental
is for config that's either specific to SaaS or (in rarer cases) to support a specific paying customer. Anything in experimental
should be considered liable to change without notice.
Things are only added to the main config if it's something that we are happy to publicly support (including community/open source users), we have updated the public documentation (and usually added to the KOTS config) and that we are confident we won't need to amend.
Looking at this, it looks like @easyCZ has correctly put it in experimental
as this is a SaaS-specific config parameter.
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.
Thanks Simon. Yes, indeed this is config only specific to SaaS at this point, hence defined in the experimental section.
@ArthurSens Are you happy with the PR as is? If so, would appreciate a ✅ |
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.
Yes, if Simon didn't see any problems so I'm also good :)
Description
Loads Stripe Price ID configuration from installer config. These fields are already defined in https://github.com/gitpod-io/ops/commit/a5855e723fe7b703d81b5f09a4869fef186b5581
The prices IDs are only loaded into the deployment, but do not get used. This allows us to validate it before we make code changes to start using them.
Related Issue(s)
Fixes #14115
How to test
Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide