Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
8f41c857
Commit
8f41c857
authored
Jul 28, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor style improvements for Helm code
parent
0582df8e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
4 deletions
+16
-4
lib/gitlab/kubernetes/helm/base_command.rb
lib/gitlab/kubernetes/helm/base_command.rb
+4
-0
lib/gitlab/kubernetes/helm/install_command.rb
lib/gitlab/kubernetes/helm/install_command.rb
+7
-3
lib/gitlab/kubernetes/helm/pod.rb
lib/gitlab/kubernetes/helm/pod.rb
+1
-1
spec/factories/clusters/applications/helm.rb
spec/factories/clusters/applications/helm.rb
+3
-0
spec/features/projects/clusters/applications_spec.rb
spec/features/projects/clusters/applications_spec.rb
+1
-0
No files found.
lib/gitlab/kubernetes/helm/base_command.rb
View file @
8f41c857
...
@@ -26,6 +26,10 @@ module Gitlab
...
@@ -26,6 +26,10 @@ module Gitlab
Gitlab
::
Kubernetes
::
ConfigMap
.
new
(
name
,
files
).
generate
Gitlab
::
Kubernetes
::
ConfigMap
.
new
(
name
,
files
).
generate
end
end
def
file_names
files
.
keys
end
def
name
def
name
raise
"Not implemented"
raise
"Not implemented"
end
end
...
...
lib/gitlab/kubernetes/helm/install_command.rb
View file @
8f41c857
...
@@ -33,9 +33,13 @@ module Gitlab
...
@@ -33,9 +33,13 @@ module Gitlab
end
end
def
script_command
def
script_command
<<~
HEREDOC
"helm install"
\
helm install
#{
optional_tls_flags
}
#{
chart
}
--name
#{
name
}#{
optional_version_flag
}
--namespace
#{
Gitlab
::
Kubernetes
::
Helm
::
NAMESPACE
}
-f /data/helm/
#{
name
}
/config/values.yaml >/dev/null
"
#{
optional_tls_flags
}
"
\
HEREDOC
"
#{
chart
}
"
\
"--name
#{
name
}
"
\
"
#{
optional_version_flag
}
"
\
"--namespace
#{
Gitlab
::
Kubernetes
::
Helm
::
NAMESPACE
}
"
\
"-f /data/helm/
#{
name
}
/config/values.yaml >/dev/null
\n
"
end
end
def
optional_version_flag
def
optional_version_flag
...
...
lib/gitlab/kubernetes/helm/pod.rb
View file @
8f41c857
...
@@ -59,7 +59,7 @@ module Gitlab
...
@@ -59,7 +59,7 @@ module Gitlab
name:
'configuration-volume'
,
name:
'configuration-volume'
,
configMap:
{
configMap:
{
name:
"values-content-configuration-
#{
command
.
name
}
"
,
name:
"values-content-configuration-
#{
command
.
name
}
"
,
items:
command
.
file
s
.
map
{
|
name
,
_
|
{
key:
name
,
path:
name
}
}
items:
command
.
file
_names
.
map
{
|
name
|
{
key:
name
,
path:
name
}
}
}
}
}
}
]
]
...
...
spec/factories/clusters/applications/helm.rb
View file @
8f41c857
...
@@ -35,12 +35,15 @@ FactoryBot.define do
...
@@ -35,12 +35,15 @@ FactoryBot.define do
factory
:clusters_applications_ingress
,
class:
Clusters
::
Applications
::
Ingress
do
factory
:clusters_applications_ingress
,
class:
Clusters
::
Applications
::
Ingress
do
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
end
end
factory
:clusters_applications_prometheus
,
class:
Clusters
::
Applications
::
Prometheus
do
factory
:clusters_applications_prometheus
,
class:
Clusters
::
Applications
::
Prometheus
do
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
end
end
factory
:clusters_applications_runner
,
class:
Clusters
::
Applications
::
Runner
do
factory
:clusters_applications_runner
,
class:
Clusters
::
Applications
::
Runner
do
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
end
end
factory
:clusters_applications_jupyter
,
class:
Clusters
::
Applications
::
Jupyter
do
factory
:clusters_applications_jupyter
,
class:
Clusters
::
Applications
::
Jupyter
do
oauth_application
factory: :oauth_application
oauth_application
factory: :oauth_application
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
cluster
factory:
%i(cluster with_installed_helm provided_by_gcp)
...
...
spec/features/projects/clusters/applications_spec.rb
View file @
8f41c857
...
@@ -121,6 +121,7 @@ describe 'Clusters Applications', :js do
...
@@ -121,6 +121,7 @@ describe 'Clusters Applications', :js do
def
wait_until_helm_created!
def
wait_until_helm_created!
retries
=
0
retries
=
0
while
Clusters
::
Cluster
.
last
.
application_helm
.
nil?
while
Clusters
::
Cluster
.
last
.
application_helm
.
nil?
raise
"Timed out waiting for helm application to be created in DB"
if
(
retries
+=
1
)
>
3
raise
"Timed out waiting for helm application to be created in DB"
if
(
retries
+=
1
)
>
3
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment