-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[installer] Update installer to use credits config #14362
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
Conversation
cannot start job - please talk to whoever's in charge of your Werft installation |
5a3ca1c
to
885b5a7
Compare
885b5a7
to
3d8dbf1
Compare
@mads-hartmann Need your pointers to adjust what I would've added into |
ae72de9
to
2c3574c
Compare
2c3574c
to
66610cb
Compare
@@ -62,7 +63,12 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { | |||
if expUsageConfig.DefaultSpendingLimit != nil { | |||
cfg.DefaultSpendingLimit = *expUsageConfig.DefaultSpendingLimit | |||
} | |||
cfg.CreditsPerMinuteByWorkspaceClass = expUsageConfig.CreditsPerMinuteByWorkspaceClass | |||
cfg.CreditsPerMinuteByWorkspaceClass = make(map[string]float64) |
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.
This doesn't need to be inside the expUsageConfig
because it doensn't relly on the expUsageConfig
being set. It relies on the workspaceClassConfig
variable only.
@@ -421,8 +421,8 @@ yq w -i "${INSTALLER_CONFIG_PATH}" experimental.webapp.usage.billInstancesAfter | |||
yq w -i "${INSTALLER_CONFIG_PATH}" experimental.webapp.usage.defaultSpendingLimit.forUsers "500" | |||
yq w -i "${INSTALLER_CONFIG_PATH}" experimental.webapp.usage.defaultSpendingLimit.forTeams "0" | |||
yq w -i "${INSTALLER_CONFIG_PATH}" experimental.webapp.usage.defaultSpendingLimit.minForUsersOnStripe "1000" | |||
yq w -i "${INSTALLER_CONFIG_PATH}" experimental.webapp.usage.creditsPerMinuteByWorkspaceClass['default'] "0.1666666667" | |||
yq w -i "${INSTALLER_CONFIG_PATH}" experimental.webapp.usage.creditsPerMinuteByWorkspaceClass['gitpodio-internal-xl'] "0.3333333333" | |||
yq w -i "${INSTALLER_CONFIG_PATH}" experimental.webapp.workspaceClasses[2].credits.perMinute "0.1666666667" |
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.
It shouldn't be defined here as part of usage, it should be set as part of setting the WS classes elsewhere
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.
This was confusing because originally it was default
and gitpodio-internal-xl
but the workspaceClasses
config were default
and small
. Fixed!
66610cb
to
a6ebf42
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.
Before we land this, we need to ensure that all existing config does contain the new |
Ahh, thank you for catching this! |
/werft run with-sh-preview 👍 started the job as gitpod-build-lau-credits-config-installer.7 |
|
a6ebf42
to
23dcc26
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.
All good from the installer perspective 🙂
23dcc26
to
daa8fd5
Compare
Thanks for all the approvals! I've re-tested and will unhold on Monday, just to be safe.. |
Description
Use the credits config in
workspaceClasses
Related Issue(s)
Depends on https://github.com/gitpod-io/ops/pull/6597 ✅ and https://github.com/gitpod-io/ops/pull/6601 ✅
Relates #13362
How to test
leeway run dev/preview:build
leeway run dev/preview:deploy-gitpod
/tmp
file that looks like/tmp/[some-gibberish].gitpod.config.yaml
cat
the file and see whether the config is as expected.Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide