-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add readiness and liveniness probes (#126)
To conform with the Fission environment interface, this PR adds readiness and liveliness probes. Additionally it updates Fission version in Dockerfile's to ensure that the builder includes the heatlhz endpoint. Finally it also: * Copied portforwarding from the fission cli to avoid the need for FISSION_URL * Removed setting of Fission env vars * Improved travis build and test scripts
- Loading branch information
1 parent
02259b5
commit e2cf04e
Showing
29 changed files
with
571 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,6 @@ data/ | |
|
||
*.tgz | ||
/fission-workflows-bundle | ||
/wfcli | ||
/wfcli | ||
__pycache__/ | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,22 +8,37 @@ import ( | |
"strings" | ||
"text/tabwriter" | ||
|
||
"github.com/fission/fission-workflows/pkg/version" | ||
"github.com/urfave/cli" | ||
) | ||
|
||
// This is a prototype of the CLI (and will be integrated into the Fission CLI eventually). | ||
func main() { | ||
// fetch the FISSION_URL env variable. If not set, port-forward to controller. | ||
var value string | ||
fissionUrl := os.Getenv("FISSION_URL") | ||
if len(fissionUrl) == 0 { | ||
fissionNamespace := getFissionNamespace() | ||
kubeConfig := getKubeConfigPath() | ||
localPort := setupPortForward(kubeConfig, fissionNamespace, "application=fission-api") | ||
value = "http://127.0.0.1:" + localPort | ||
fmt.Printf("Forwarded Fission API to %s.\n", value) | ||
} else { | ||
value = fissionUrl | ||
} | ||
|
||
app := cli.NewApp() | ||
app.Author = "Erwin van Eyk" | ||
app.Email = "[email protected]" | ||
app.Version = version.VERSION | ||
app.EnableBashCompletion = true | ||
app.Usage = "Fission Workflows CLI" | ||
app.Description = "CLI for Fission Workflows" | ||
app.HideVersion = true | ||
app.Flags = []cli.Flag{ | ||
cli.StringFlag{ | ||
Name: "url, u", | ||
Value: "http://localhost:31313", | ||
Value: value, | ||
EnvVar: "FISSION_URL", | ||
Usage: "Url to the Fission apiserver", | ||
}, | ||
|
@@ -60,10 +75,6 @@ func table(writer io.Writer, headings []string, rows [][]string) { | |
} | ||
} | ||
|
||
//func createTransportClient(baseUrl *url.URL) *httptransport.Runtime { | ||
// return httptransport.New(baseUrl.Host, "/proxy/workflows-apiserver/", []string{baseUrl.Scheme}) | ||
//} | ||
|
||
func fail(msg ...interface{}) { | ||
for _, line := range msg { | ||
fmt.Fprintln(os.Stderr, line) | ||
|
Oops, something went wrong.