Refactor kubewatcher/webhook publisher

Create a Publisher interface. Refactor webhook publisher to satisfy
that interface.

Add some limited retries to webhook publisher.
This commit is contained in:
Soam Vasani
2016-12-19 14:38:44 -08:00
parent dddb50c00f
commit 0456df0d63
7 changed files with 181 additions and 115 deletions
+3 -1
View File
@@ -21,7 +21,9 @@ import (
)
func UrlForFunction(m *Metadata) string {
prefix := "/fission-function"
// TODO this assumes the router's namespace is the same as whatever is hitting
// this url -- so e.g. kubewatcher will have to run in the same ns as router.
prefix := "http://router/fission-function"
if len(m.Uid) > 0 {
return fmt.Sprintf("%v/%v/%v", prefix, m.Name, m.Uid)
} else {