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
a607fe79
Commit
a607fe79
authored
Nov 30, 2017
by
Federico Gimenez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iinitialize message only when at least one manifest is kept
parent
93bce130
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
resource_policy.go
pkg/tiller/resource_policy.go
+4
-1
No files found.
pkg/tiller/resource_policy.go
View file @
a607fe79
...
...
@@ -59,7 +59,7 @@ func filterManifestsToKeep(manifests []Manifest) ([]Manifest, []Manifest) {
}
func
summarizeKeptManifests
(
manifests
[]
Manifest
,
kubeClient
environment
.
KubeClient
,
namespace
string
)
string
{
message
:=
"These resources were kept due to the resource policy:
\n
"
var
message
string
for
_
,
m
:=
range
manifests
{
// check if m is in fact present from k8s client's POV.
output
,
err
:=
kubeClient
.
Get
(
namespace
,
bytes
.
NewBufferString
(
m
.
Content
))
...
...
@@ -68,6 +68,9 @@ func summarizeKeptManifests(manifests []Manifest, kubeClient environment.KubeCli
}
details
:=
"["
+
m
.
Head
.
Kind
+
"] "
+
m
.
Head
.
Metadata
.
Name
+
"
\n
"
if
message
==
""
{
message
=
"These resources were kept due to the resource policy:
\n
"
}
message
=
message
+
details
}
return
message
...
...
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