diff --git a/frontend/server/app.test.ts b/frontend/server/app.test.ts index 4eeb3588d96..d6bc8ff0857 100644 --- a/frontend/server/app.test.ts +++ b/frontend/server/app.test.ts @@ -188,7 +188,7 @@ describe('UIServer apis', () => { ? Promise.resolve({ ok: true, text: () => Promise.resolve('test-cluster') }) : Promise.reject('Unexpected request'), ); - app = new UIServer(loadConfigs(argv, {})); + app = new UIServer(loadConfigs(argv, { DISABLE_GKE_METADATA: 'false' })); const request = requests(app.start()); request @@ -202,7 +202,7 @@ describe('UIServer apis', () => { ? Promise.resolve({ ok: false, text: () => Promise.resolve('404 not found') }) : Promise.reject('Unexpected request'), ); - app = new UIServer(loadConfigs(argv, {})); + app = new UIServer(loadConfigs(argv, { DISABLE_GKE_METADATA: 'false' })); const request = requests(app.start()); request.get('/system/cluster-name').expect(500, 'Failed fetching GKE cluster name', done); @@ -225,7 +225,7 @@ describe('UIServer apis', () => { ? Promise.resolve({ ok: true, text: () => Promise.resolve('test-project') }) : Promise.reject('Unexpected request'), ); - app = new UIServer(loadConfigs(argv, {})); + app = new UIServer(loadConfigs(argv, { DISABLE_GKE_METADATA: 'false' })); const request = requests(app.start()); request.get('/system/project-id').expect(200, 'test-project', done); @@ -236,7 +236,7 @@ describe('UIServer apis', () => { ? Promise.resolve({ ok: false, text: () => Promise.resolve('404 not found') }) : Promise.reject('Unexpected request'), ); - app = new UIServer(loadConfigs(argv, {})); + app = new UIServer(loadConfigs(argv, { DISABLE_GKE_METADATA: 'false' })); const request = requests(app.start()); request.get('/system/project-id').expect(500, 'Failed fetching GKE project id', done); diff --git a/frontend/server/configs.ts b/frontend/server/configs.ts index ce2f62804fb..8500e1cc7f2 100644 --- a/frontend/server/configs.ts +++ b/frontend/server/configs.ts @@ -108,7 +108,7 @@ export function loadConfigs(argv: string[], env: ProcessEnv): UIConfigs { /** The main container name of a pod where logs are retrieved */ POD_LOG_CONTAINER_NAME = 'main', /** Disables GKE metadata endpoint. */ - DISABLE_GKE_METADATA = 'false', + DISABLE_GKE_METADATA = 'true', /** Enable authorization checks for multi user mode. */ ENABLE_AUTHZ = 'false', /** Deployment type. */ diff --git a/manifests/kustomize/env/gcp/gcp-configurations-patch.yaml b/manifests/kustomize/env/gcp/gcp-configurations-patch.yaml index 5e725b536d2..969bdd5661c 100644 --- a/manifests/kustomize/env/gcp/gcp-configurations-patch.yaml +++ b/manifests/kustomize/env/gcp/gcp-configurations-patch.yaml @@ -20,3 +20,17 @@ spec: configMapKeyRef: name: pipeline-install-config key: gcsProjectId + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ml-pipeline-ui +spec: + template: + spec: + containers: + - name: ml-pipeline-ui + env: + - name: DISABLE_GKE_METADATA + value: 'false' \ No newline at end of file