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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8b752167
Commit
8b752167
authored
Jun 05, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
c92ac7f8
879f0022
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
changelogs/unreleased/62713-fix-uninstalling-cluster-apps.yml
...gelogs/unreleased/62713-fix-uninstalling-cluster-apps.yml
+5
-0
lib/gitlab/kubernetes/helm/api.rb
lib/gitlab/kubernetes/helm/api.rb
+1
-0
spec/lib/gitlab/kubernetes/helm/api_spec.rb
spec/lib/gitlab/kubernetes/helm/api_spec.rb
+24
-0
No files found.
changelogs/unreleased/62713-fix-uninstalling-cluster-apps.yml
0 → 100644
View file @
8b752167
---
title
:
Fix connection to Tiller error while uninstalling
merge_request
:
29131
author
:
type
:
fixed
lib/gitlab/kubernetes/helm/api.rb
View file @
8b752167
...
...
@@ -24,6 +24,7 @@ module Gitlab
def
uninstall
(
command
)
namespace
.
ensure_exists!
create_config_map
(
command
)
delete_pod!
(
command
.
pod_name
)
kubeclient
.
create_pod
(
command
.
pod_resource
)
...
...
spec/lib/gitlab/kubernetes/helm/api_spec.rb
View file @
8b752167
...
...
@@ -36,6 +36,8 @@ describe Gitlab::Kubernetes::Helm::Api do
describe
'#uninstall'
do
before
do
allow
(
client
).
to
receive
(
:create_pod
).
and_return
(
nil
)
allow
(
client
).
to
receive
(
:get_config_map
).
and_return
(
nil
)
allow
(
client
).
to
receive
(
:create_config_map
).
and_return
(
nil
)
allow
(
client
).
to
receive
(
:delete_pod
).
and_return
(
nil
)
allow
(
namespace
).
to
receive
(
:ensure_exists!
).
once
end
...
...
@@ -53,6 +55,28 @@ describe Gitlab::Kubernetes::Helm::Api do
subject
.
uninstall
(
command
)
end
context
'with a ConfigMap'
do
let
(
:resource
)
{
Gitlab
::
Kubernetes
::
ConfigMap
.
new
(
application_name
,
files
).
generate
}
it
'creates a ConfigMap on kubeclient'
do
expect
(
client
).
to
receive
(
:create_config_map
).
with
(
resource
).
once
subject
.
install
(
command
)
end
context
'config map already exists'
do
before
do
expect
(
client
).
to
receive
(
:get_config_map
).
with
(
"values-content-configuration-
#{
application_name
}
"
,
gitlab_namespace
).
and_return
(
resource
)
end
it
'updates the config map'
do
expect
(
client
).
to
receive
(
:update_config_map
).
with
(
resource
).
once
subject
.
install
(
command
)
end
end
end
end
describe
'#install'
do
...
...
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