diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-05-16 12:01:13 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-05-25 17:16:41 +0300 |
commit | 4220e914db356f4a55c771a7ad7f559e2507dd56 (patch) | |
tree | 104c2b12cc9369985dd6e0f938a94077e680ddb3 /app/models/clusters/applications/jupyter.rb | |
parent | 8a1ac8f4ce0d8e96234ef32cd032adaf7cc57b1a (diff) | |
download | gitlab-ce-4220e914db356f4a55c771a7ad7f559e2507dd56.tar.gz |
Add support for Jupyter in GitLab via Kubernetes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/clusters/applications/jupyter.rb')
-rw-r--r-- | app/models/clusters/applications/jupyter.rb | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/app/models/clusters/applications/jupyter.rb b/app/models/clusters/applications/jupyter.rb index ec75c120dac..ef62be34abd 100644 --- a/app/models/clusters/applications/jupyter.rb +++ b/app/models/clusters/applications/jupyter.rb @@ -12,17 +12,39 @@ module Clusters default_value_for :version, VERSION def chart - # TODO: publish jupyterhub charts that we can use for our installation - # and provide path to it here. + "#{name}/jupyterhub" + end + + def repository + 'https://jupyterhub.github.io/helm-chart/' + end + + def values + content_values.to_yaml end def install_command Gitlab::Kubernetes::Helm::InstallCommand.new( name, chart: chart, - values: values + values: values, + repository: repository ) end + + private + + def specification + { + "ingress" => { "hosts" => [hostname] }, + "hub" => { "cookieSecret" => SecureRandom.hex(32) }, + "proxy" => { "secretToken" => SecureRandom.hex(32) } + } + end + + def content_values + YAML.load_file(chart_values_file).deep_merge!(specification) + end end end end |