Skip to content

Add "managed docker compose" deploy type for managed instances

Administrator requested to merge kr/managed-instance-deploy-type into main

Created by: courier-new

Part 1 for https://github.com/sourcegraph/sourcegraph/issues/36920.

The Batch Changes team is interested in configuring a setting to be default false for managed instances but default true for everyone else.

This PR adds a new value for the DEPLOY_TYPE environment variable to indicate an instance is managed by Sourcegraph. Since today, managed instances are all run with docker-compose, the value is named as such: "managed-docker-compose." This gives us the flexibility to support additional environment types for managed instances in the future. A corresponding method, IsManagedInstance, is added to enable that all future types of managed instances can also be treated the same by the backend code when it makes sense to do so, such as for our team's use case.

All other changes made here are meant to mirror those from https://github.com/sourcegraph/sourcegraph/pull/32407.

Test plan

I'm not very familiar with this part of the codebase and would appreciate recommendations for the best way to test this. 🙂

Merge request reports

Loading