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
8ba0eb4f
Commit
8ba0eb4f
authored
Dec 09, 2015
by
vaikas-google
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for helm packages. Quite hacky in parts, needs to resolve naming collisions
parent
62f19486
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
5 deletions
+12
-5
dm.go
dm/dm.go
+0
-1
package.yaml
examples/package/package.yaml
+4
-0
expansion.py
expandybird/expansion/expansion.py
+3
-3
typeresolver.go
manager/manager/typeresolver.go
+5
-0
github_package_registry.go
registry/github_package_registry.go
+0
-1
No files found.
dm/dm.go
View file @
8ba0eb4f
...
...
@@ -214,7 +214,6 @@ func execute() {
// Type is most likely a primitive.
tUrl
=
args
[
1
]
}
else
{
// TODO(vaikas): Support packages properly.
tUrl
=
tUrls
[
0
]
}
path
:=
fmt
.
Sprintf
(
"types/%s/instances"
,
url
.
QueryEscape
(
tUrl
))
...
...
examples/package/package.yaml
0 → 100644
View file @
8ba0eb4f
resources
:
-
name
:
cassandra
type
:
github.com/helm/charts/cassandra
properties
:
null
expandybird/expansion/expansion.py
View file @
8ba0eb4f
...
...
@@ -50,12 +50,12 @@ def Expand(config, imports=None, env=None, validate_schema=False):
Raises:
ExpansionError: if there is any error occurred during expansion
"""
try
:
#
try:
return
_Expand
(
config
,
imports
=
imports
,
env
=
env
,
validate_schema
=
validate_schema
)
except
Exception
as
e
:
#
except Exception as e:
# print traceback.format_exc()
raise
ExpansionError
(
'config'
,
str
(
e
))
#
raise ExpansionError('config', str(e))
def
_Expand
(
config
,
imports
=
None
,
env
=
None
,
validate_schema
=
False
):
...
...
manager/manager/typeresolver.go
View file @
8ba0eb4f
...
...
@@ -18,6 +18,7 @@ package manager
import
(
"fmt"
"log"
"net/http"
"time"
...
...
@@ -68,6 +69,7 @@ func resolverError(c *common.Configuration, err error) error {
}
func
performHTTPGet
(
g
util
.
HTTPClient
,
u
string
,
allowMissing
bool
)
(
content
string
,
err
error
)
{
log
.
Printf
(
"Fetching %s"
,
u
)
r
,
code
,
err
:=
g
.
Get
(
u
)
if
err
!=
nil
{
return
""
,
err
...
...
@@ -99,6 +101,7 @@ func (tr *typeResolver) ResolveTypes(config *common.Configuration, imports []*co
// TODO(vaikas): Need to account for multiple URLs being fetched for a given type.
toFetch
:=
make
([]
*
fetchUnit
,
0
,
tr
.
maxUrls
)
for
_
,
r
:=
range
config
.
Resources
{
log
.
Printf
(
"checking: %s"
,
r
.
Type
)
// Map the type to a fetchable URL (if applicable) or skip it if it's a non-fetchable type (primitive for example).
urls
,
err
:=
tr
.
MapFetchableURLs
(
r
.
Type
)
if
err
!=
nil
{
...
...
@@ -121,7 +124,9 @@ func (tr *typeResolver) ResolveTypes(config *common.Configuration, imports []*co
}
count
:=
0
log
.
Printf
(
"toFetch %#v"
,
toFetch
)
for
len
(
toFetch
)
>
0
{
log
.
Printf
(
"toFetch2 %#v"
,
toFetch
)
// 1. If short github URL, resolve to a download URL
// 2. Fetch import URL. Exit if no URLs left
// 3. Check/handle HTTP status
...
...
registry/github_package_registry.go
View file @
8ba0eb4f
...
...
@@ -48,7 +48,6 @@ func NewGithubPackageRegistry(owner, repository string) *GithubPackageRegistry {
}
// List the types from the Registry.
// TODO(vaikas): Figure out how the versions work here.
func
(
g
*
GithubPackageRegistry
)
List
()
([]
Type
,
error
)
{
// Just list all the types at the top level.
types
,
err
:=
g
.
getDirs
(
""
)
...
...
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