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

[installer] Allow more parts of the server config to vary #9630

Merged
merged 4 commits into from
Apr 29, 2022

Conversation

andrew-farries
Copy link
Contributor

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 makes a few parts of the server config configurable that were previously hard-coded by the installer:

  • disableDynamicAuthProviderLogin
  • enableLocalApp
  • defaultBaseImageRegistryWhitelist

Related Issue(s)

Part of #9097

How to test

Create an installer config file containing this experimental section:

experimental:
  webapp:
    server:
      disableDynamicAuthProviderLogin: false
      enableLocalApp: true
      defaultBaseImageRegistryWhitelist:
      - https://index.docker.io/v1/

Get a versions.yaml for use with the installer:

docker run -it --rm "eu.gcr.io/gitpod-core-dev/build/versions:${version}" cat versions.yaml > versions.yaml

Then invoke the installer as:

go run . render --debug-version-file versions.yaml --config /path/to/config --use-experimental-config

The rendered output will have the values from the config for the relevant fields in the server ConfigMap (under the config.json key).

Release Notes

Allow `disableDynamicAuthProviderLogin`, `enableLocalApp` and `defaultBaseImageRegistryWhitelist` server config to be configurable via the installer

Documentation

None.

Andrew Farries added 3 commits April 28, 2022 15:21
This was previously hard-coded to false in the server configmap.
This was previously hard-coded to true in the server configmap.
This was previously hard-coded to empty in the server configmap.
@andrew-farries andrew-farries requested review from a team April 28, 2022 15:45
@github-actions github-actions bot added team: delivery Issue belongs to the self-hosted team team: webapp Issue belongs to the WebApp team labels Apr 28, 2022
@andrew-farries andrew-farries changed the title Af/installer various server configs [installer] Allow more parts of the server config to vary Apr 28, 2022
Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving because the code is minimal and LGTM

/hold
bonus points for adding tests, though! 🧡

@andrew-farries
Copy link
Contributor Author

Added tests for the configmap configuration done in this PR and previous ones.

@andrew-farries andrew-farries requested a review from geropl April 29, 2022 08:31
@geropl
Copy link
Member

geropl commented Apr 29, 2022

/unhold

Thank you @andrew-farries ! 🙏

To fix the build issue please run leeway run components:update-license-header and push the result. 👍

Extract named structs for fields that were nested under `ServerConfig`
so that they can be instantiated in tests.
@andrew-farries andrew-farries force-pushed the af/installer-various-server-configs branch from 79f54c7 to 7184057 Compare April 29, 2022 09:26
@geropl geropl self-assigned this Apr 29, 2022
@roboquat roboquat merged commit 857f98c into main Apr 29, 2022
@roboquat roboquat deleted the af/installer-various-server-configs branch April 29, 2022 13:48
@roboquat roboquat added the deployed: webapp Meta team change is running in production label May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production release-note size/L team: delivery Issue belongs to the self-hosted team team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants