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
fb0e722e
Commit
fb0e722e
authored
Mar 29, 2016
by
jackgr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect expansion validation
parent
94fbdda7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
validate.go
pkg/expansion/validate.go
+9
-2
No files found.
pkg/expansion/validate.go
View file @
fb0e722e
...
@@ -17,6 +17,8 @@ limitations under the License.
...
@@ -17,6 +17,8 @@ limitations under the License.
package
expansion
package
expansion
import
(
import
(
"github.com/kubernetes/helm/pkg/chart"
"fmt"
"fmt"
)
)
...
@@ -32,8 +34,13 @@ func ValidateRequest(request *ServiceRequest) error {
...
@@ -32,8 +34,13 @@ func ValidateRequest(request *ServiceRequest) error {
chartInv
:=
request
.
ChartInvocation
chartInv
:=
request
.
ChartInvocation
chartFile
:=
request
.
Chart
.
Chartfile
chartFile
:=
request
.
Chart
.
Chartfile
if
chartInv
.
Type
!=
chartFile
.
Name
{
l
,
err
:=
chart
.
Parse
(
chartInv
.
Type
)
return
fmt
.
Errorf
(
"Request chart invocation does not match provided chart"
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"cannot parse chart reference %s: %s"
,
chartInv
.
Type
,
err
)
}
if
l
.
Name
!=
chartFile
.
Name
{
return
fmt
.
Errorf
(
"Chart invocation type (%s) does not match provided chart (%s)"
,
chartInv
.
Type
,
chartFile
.
Name
)
}
}
if
chartFile
.
Expander
==
nil
{
if
chartFile
.
Expander
==
nil
{
...
...
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