Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
93bce130
Commit
93bce130
authored
Nov 29, 2017
by
Federico Gimenez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix signatures
parent
81eaf2f2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
release_modules.go
pkg/tiller/release_modules.go
+2
-2
resource_policy.go
pkg/tiller/resource_policy.go
+2
-2
No files found.
pkg/tiller/release_modules.go
View file @
93bce130
...
...
@@ -159,9 +159,9 @@ func DeleteRelease(rel *release.Release, vs chartutil.VersionSet, kubeClient env
return
rel
.
Manifest
,
[]
error
{
fmt
.
Errorf
(
"corrupted release record. You must manually delete the resources: %s"
,
err
)}
}
filesToKeep
,
filesToDelete
:=
filterManifestsToKeep
(
files
,
kubeClient
,
rel
.
Namespace
)
filesToKeep
,
filesToDelete
:=
filterManifestsToKeep
(
files
)
if
len
(
filesToKeep
)
>
0
{
kept
=
summarizeKeptManifests
(
filesToKeep
)
kept
=
summarizeKeptManifests
(
filesToKeep
,
kubeClient
,
rel
.
Namespace
)
}
errs
=
[]
error
{}
...
...
pkg/tiller/resource_policy.go
View file @
93bce130
...
...
@@ -33,7 +33,7 @@ const resourcePolicyAnno = "helm.sh/resource-policy"
// during an uninstallRelease action.
const
keepPolicy
=
"keep"
func
filterManifestsToKeep
(
manifests
[]
Manifest
,
kubeClient
environment
.
KubeClient
,
namespace
string
)
([]
Manifest
,
[]
Manifest
)
{
func
filterManifestsToKeep
(
manifests
[]
Manifest
)
([]
Manifest
,
[]
Manifest
)
{
remaining
:=
[]
Manifest
{}
keep
:=
[]
Manifest
{}
...
...
@@ -58,7 +58,7 @@ func filterManifestsToKeep(manifests []Manifest, kubeClient environment.KubeClie
return
keep
,
remaining
}
func
summarizeKeptManifests
(
manifests
[]
Manifest
)
string
{
func
summarizeKeptManifests
(
manifests
[]
Manifest
,
kubeClient
environment
.
KubeClient
,
namespace
string
)
string
{
message
:=
"These resources were kept due to the resource policy:
\n
"
for
_
,
m
:=
range
manifests
{
// check if m is in fact present from k8s client's POV.
...
...
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