|
|
@ -44,7 +44,7 @@ var (
|
|
|
|
deployment_name = flag.String("name", "", "Name of deployment, used for deploy and update commands (defaults to template name)")
|
|
|
|
deployment_name = flag.String("name", "", "Name of deployment, used for deploy and update commands (defaults to template name)")
|
|
|
|
stdin = flag.Bool("stdin", false, "Reads a configuration from the standard input")
|
|
|
|
stdin = flag.Bool("stdin", false, "Reads a configuration from the standard input")
|
|
|
|
properties = flag.String("properties", "", "Properties to use when deploying a template (e.g., --properties k1=v1,k2=v2)")
|
|
|
|
properties = flag.String("properties", "", "Properties to use when deploying a template (e.g., --properties k1=v1,k2=v2)")
|
|
|
|
template_registry = flag.String("registry", "kubernetes/application-dm-templates", "Github based template registry (owner/repo[/path])")
|
|
|
|
template_registry = flag.String("registry", "github.com/kubernetes/application-dm-templates", "Registry (github.com/owner/repo)")
|
|
|
|
service = flag.String("service", "http://localhost:8001/api/v1/proxy/namespaces/dm/services/manager-service:manager", "URL for deployment manager")
|
|
|
|
service = flag.String("service", "http://localhost:8001/api/v1/proxy/namespaces/dm/services/manager-service:manager", "URL for deployment manager")
|
|
|
|
binary = flag.String("binary", "../expandybird/expansion/expansion.py", "Path to template expansion binary")
|
|
|
|
binary = flag.String("binary", "../expandybird/expansion/expansion.py", "Path to template expansion binary")
|
|
|
|
timeout = flag.Int("timeout", 10, "Time in seconds to wait for response")
|
|
|
|
timeout = flag.Int("timeout", 10, "Time in seconds to wait for response")
|
|
|
@ -82,12 +82,7 @@ var usage = func() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func getGitRegistry() (registry.Registry, error) {
|
|
|
|
func getGitRegistry() (registry.Registry, error) {
|
|
|
|
rs := registry.NewDefaultRegistryProvider()
|
|
|
|
return registry.NewDefaultRegistryProvider().GetRegistry(*template_registry)
|
|
|
|
s := strings.Split(*template_registry, "/")
|
|
|
|
|
|
|
|
if len(s) < 2 {
|
|
|
|
|
|
|
|
panic(fmt.Errorf("invalid template registry: %s", *template_registry))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return rs.GetRegistry("github.com/" + s[0] + "/" + s[1])
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
func main() {
|
|
|
|