提交 f7e28d26 编写于 作者: D Dmitriy Zaporozhets

Merge branch 'dz-expose-cluster-id-to-jupyter' into 'master'

Add GitLab cluster id to jupyter config

Closes #51474 and #51594

See merge request gitlab-org/gitlab-ce!21796
......@@ -73,6 +73,11 @@ module Clusters
"clientSecret" => oauth_application.secret,
"callbackUrl" => callback_url
}
},
"singleuser" => {
"extraEnv" => {
"GITLAB_CLUSTER_ID" => cluster.id
}
}
}
end
......
......@@ -108,8 +108,15 @@ describe Clusters::Applications::Jupyter do
expect(values).to include('rbac')
expect(values).to include('proxy')
expect(values).to include('auth')
expect(values).to include('singleuser')
expect(values).to match(/clientId: '?#{application.oauth_application.uid}/)
expect(values).to match(/callbackUrl: '?#{application.callback_url}/)
end
context 'when cluster belongs to a project' do
it 'sets GitLab project id' do
expect(values).to match(/GITLAB_CLUSTER_ID: '?#{application.cluster.id}/)
end
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册