-
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
[installer]: Allow replica counts to be specified for all components #9495
Conversation
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?
gitpod/install/installer/pkg/components/openvsx-proxy/statefulset.go
Lines 43 to 44 in 948ae51
// todo(sje): receive config value | |
Replicas: pointer.Int32(1), |
@andrew-farries I hope I'm not coming across as Mr Negative, but I'm not sure this is the right approach. The What might be a better approach is a more nuanced approach.
Then the value can be I'd also prefer that the Also, we'll need to have some validation to make sure that the values are an integer. It's worth seeing what happens if you set the value to a string/boolean - hopefully it'll error/panic, but I don't think it would from reading the code |
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.
PR looks good, left a comment around general approach to config in go. Would you be able to please also add tests for the common.Replicas
function? It's shared across many components and I'd rather we did have some tests to start with as we evolve it.
@mrsimonemms this approach was taken after a sync with @corneliusludmann last week which we scheduled for exactly this discussion. In general I agree: This is an option that we will need in for self-hosted at some point. But we decided to solve it this way, and put it into |
/hold @andrew-farries Could you add unit tests as suggested by @easyCZ ? Thank you! 🙏 |
939a2e1
to
3950294
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.
Approving as I'm happy with the changes. Left a couple of suggestions but up to you if you want to tackle them or how.
Thanks, I missed this one. |
If the value for |
5599f33
to
2a30a53
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.
Looks good to me.
Regarding experimental
or not: As long as we don't have customers asking for this and we are not sure yet how exactly this config should look like it's much more convenient for us to use the experimental
section as incubation for this config and move it to the general (public) section once we are fine with that and want to support this officially. That was the reason for the decision.
Allow a new `common` field under `experimental` for cross-cutting concerns such as replica counts.
To allow lookup of replica counts. Defaults to one if there is no replica count configured for a component.
So that they respect the new `experimental.common.podConfig.<component>.replicas` setting.
2a30a53
to
672ff2e
Compare
/werft run with-clean-slate-deployment=true 👍 started the job as gitpod-build-af-installer-specify-replicacount.9 |
/werft run with-vm=true 👍 started the job as gitpod-build-af-installer-specify-replicacount.10 |
/werft run with-vm=true 👍 started the job as gitpod-build-af-installer-specify-replicacount.12 |
To avoid problems with import cycles when importing components/* packages.
75a1234
to
725fbd0
Compare
@easyCZ requested a re-review from you as I had to move the tests into an |
To run each testcase as a sub-test.
/unhold |
Description
One of the Webapp team's epics for Q2 is to use the Gitpod installer to deploy to Gitpod SaaS. In order to do that we will need to add additional configuration to the installer to make the output suitable for a SaaS deployment as opposed to a self-hosted deployment.
This PR adds the ability to configure the number of replicas for each component, rather than using to a hard-coded value of
1
.Related Issue(s)
Part of #9097
How to test
Create an installer config file containing this
experimental
section:Get a
versions.yaml
for use with the installer:Then invoke the installer as:
The rendered output will have the values from the config for the
server
andcontent-service
components and the old default of1
for all other components.Release Notes
Documentation
None.