Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6fd3c7e98 | ||
|
|
1c05534071 |
@@ -4,6 +4,7 @@ fx
|
||||
Poor man's function as a service.
|
||||
<br/>
|
||||

|
||||

|
||||
[](https://codecov.io/gh/metrue/fx)
|
||||
[](https://goreportcard.com/report/github.com/metrue/fx)
|
||||
[](http://godoc.org/github.com/metrue/fx)
|
||||
|
||||
2
fx.go
2
fx.go
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
const version = "0.8.75"
|
||||
const version = "0.8.76"
|
||||
|
||||
func init() {
|
||||
go checkForUpdate()
|
||||
|
||||
@@ -56,7 +56,13 @@ func Provision(ctx context.Contexter) (err error) {
|
||||
return err
|
||||
}
|
||||
var deployer infra.Deployer
|
||||
if cloud.GetType() == types.CloudTypeDocker {
|
||||
if os.Getenv("KUBECONFIG") != "" {
|
||||
cloudType = types.CloudTypeK8S
|
||||
conf = os.Getenv("KUBECONFIG")
|
||||
}
|
||||
ctx.Set("cloud_type", types.CloudTypeK8S)
|
||||
|
||||
if cloudType == types.CloudTypeDocker {
|
||||
var meta map[string]string
|
||||
if err := json.Unmarshal([]byte(conf), &meta); err != nil {
|
||||
return err
|
||||
@@ -72,12 +78,7 @@ func Provision(ctx context.Contexter) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else if cloud.GetType() == types.CloudTypeK8S {
|
||||
ctx.Set("cloud_type", types.CloudTypeK8S)
|
||||
|
||||
if os.Getenv("KUBECONFIG") != "" {
|
||||
conf = os.Getenv("KUBECONFIG")
|
||||
}
|
||||
} else if cloudType == types.CloudTypeK8S {
|
||||
deployer, err = k8sInfra.CreateDeployer(conf)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user