Skip to content

Commit 44ad77a

Browse files
[server] Allow to disable definitely gp
1 parent a396065 commit 44ad77a

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

chart/templates/server-deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ spec:
127127
- name: GITPOD_GITHUB_APP_MKT_NAME
128128
value: "{{ $comp.github.app.marketPlaceName }}"
129129
{{- end }}
130+
- name: GITPOD_DEFINITELY_GP_DISABLED
131+
value: "{{ $comp.definitelyGpDisabled | default "false" }}"
130132
- name: LOG_LEVEL
131133
value: "trace"
132134
- name: NODE_ENV

chart/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ components:
291291
volumes: null
292292
garbageCollection:
293293
disabled: "false"
294+
definitelyGpDisabled: "false"
294295

295296
workspace:
296297
ports:

components/server/src/env.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ export class Env extends AbstractComponentEnv {
7272
readonly githubAppCertPath: string = process.env.GITPOD_GITHUB_APP_CERT_PATH || "unknown";
7373
readonly githubAppMarketplaceName: string = process.env.GITPOD_GITHUB_APP_MKT_NAME || "unknown";
7474

75+
readonly definitelyGpDisabled: boolean = process.env.GITPOD_DEFINITELY_GP_DISABLED == "true";
76+
7577
readonly daysBeforeGarbageCollection: number = parseInt(process.env.GITPOD_DAYS_BEFORE_GARBAGE_COLLECTION || '14', 10);
7678
readonly daysBeforeGarbageCollectingPrebuilds: number = parseInt(process.env.GITPOD_DAYS_BEFORE_GARBAGE_COLLECTING_PREBUILDS || '7', 10);
7779
readonly garbageCollectionStartDate: number = process.env.GITPOD_GARBAGE_COLLECTION_START_DATE ?

components/server/src/workspace/config-provider.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,13 @@ export class ConfigProvider {
210210
const span = TraceContext.startSpan("fetchExternalGitpodFileContent", ctx);
211211
span.setTag("repo", `${repository.owner}/${repository.name}`);
212212

213+
if (this.env.definitelyGpDisabled) {
214+
return {
215+
content: undefined,
216+
basePath: `${repository.name}`
217+
};
218+
}
219+
213220
try {
214221
const ownerConfigBasePath = `${repository.name}/${repository.owner}`;
215222
const baseConfigBasePath = `${repository.name}`;

0 commit comments

Comments
 (0)