Skip to content

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 may 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 configuration for two such values, maximumBackupCount and blobQuota, which are currently hard-coded in the installer but need to be configurable for SaaS.

Related Issue(s)

Part of #9097.

How to test

Build the installer and run it with

render --config /path/to/config

Where the config file contains a objectStorage configuration section including the new values, like:

objectStorage:
  inCluster: false
  maximumBackupCount: 10
  blobQuota: 2
  cloudStorage:
    project: gitpod-staging
    serviceAccount:
      kind: secret
      name: ws-sync-gcloud

The rendered output for the content-service configMap should then contain the new values under the config.json key:

- apiVersion: v1
  data:
    config.json: |-
      {
       "pprof": {
        "address": ":6060"
       },
       "prometheus": {
        "address": ":9500"
       },
       "service": {
        "address": ":8080",
        "tls": {
         "ca": "",
         "crt": "",
         "key": ""
        }
       },
       "storage": {
        "backupTrail": {
         "enabled": true,
         "maxLength": 3
        },
        "blobQuota": 2,
        "gcloud": {
         "credentialsFile": "/mnt/secrets/storage/service-account.json",
         "maximumBackupCount": 10,
         "parallelUpload": 6,
         "projectId": "gitpod-staging",
         "region": "europe-west1"
        },
        "kind": "gcloud",
        "minio": {
         "accessKey": "",
         "accessKeyFile": "",
         "endpoint": "",
         "region": "",
         "secretKey": "",
         "secretKeyFile": ""
        },
        "stage": ""
       }
      }
  kind: ConfigMap
  metadata:
    creationTimestamp: null
    labels:
      app: gitpod
      component: content-service
    name: content-service

Release Notes

Make `maximumBackupCount` and `blobQuota` configurable via the installer config file.

Documentation

No changes required as these values should be left at the pre-existing defaults to self-hosted installations.

Andrew Farries added 2 commits April 11, 2022 14:27
Previously, this was hardcoded to 3 but needs to be configurable for
Gitpod SaaS.
Previously, this was hardcoded to 5GiB but needs to be configurable for
Gitpod SaaS.
@andrew-farries andrew-farries requested a review from a team April 11, 2022 15:21
@github-actions github-actions bot added the team: delivery Issue belongs to the self-hosted team label Apr 11, 2022
@geropl geropl requested a review from a team April 11, 2022 15:24
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Apr 11, 2022
@geropl
Copy link
Member

geropl commented Apr 11, 2022

Pulling workspace (in person of @kylos101 ) in here because they own the content-service.

@geropl
Copy link
Member

geropl commented Apr 12, 2022

@mrsimonemms Would you have time to review this? 🙏

@mrsimonemms
Copy link
Contributor

mrsimonemms commented Apr 12, 2022

@mrsimonemms Would you have time to review this? pray

@geropl anything for my friends in WebApp 🎉

Copy link
Contributor

@mrsimonemms mrsimonemms left a comment

Choose a reason for hiding this comment

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

Good work.

Is this a value we expect that a self-hosted user would be wanting to change - maybe not a small deployment, but a big bank/govt agency? If so, @gitpod-io/engineering-self-hosted may need to think about how we put this in KOTS (the "advanced" section may be enough)

@roboquat roboquat merged commit 6015def into main Apr 12, 2022
@roboquat roboquat deleted the af/add-maximum-backup-count branch April 12, 2022 11:25
@geropl
Copy link
Member

geropl commented Apr 12, 2022

Is this a value we expect that a self-hosted user would be wanting to change - maybe not a small deployment, but a big bank/govt agency?

@mrsimonemms Exactly where I'd put it: not interesting for Gitpod 101 Self-Hosted installation, but interesting for installs that are a bit more regulated.

@mrsimonemms
Copy link
Contributor

Great - advanced section it is. That suits me as a) we don't need to do anything and b) it doesn't clutter up the config page with extra things that someone could break

@roboquat roboquat added the deployed: workspace Workspace team change is running in production label Apr 12, 2022
@andrew-farries andrew-farries mentioned this pull request Apr 13, 2022
53 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production release-note size/S team: delivery Issue belongs to the self-hosted team team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants