diff --git a/handlers/deploy.go b/handlers/deploy.go index 395475e56..7a0265bef 100644 --- a/handlers/deploy.go +++ b/handlers/deploy.go @@ -9,8 +9,6 @@ import ( "io/ioutil" "log" "net/http" - "os" - "path/filepath" "regexp" "strconv" "strings" @@ -118,16 +116,19 @@ func MakeDeployHandler(functionNamespace string, clientset *kubernetes.Clientset func makeDeploymentSpec(request requests.CreateFunctionRequest, existingSecrets map[string]*apiv1.Secret, config *DeployHandlerConfig) (*v1beta1.Deployment, error) { envVars := buildEnvVars(&request) - path := filepath.Join(os.TempDir(), ".lock") probe := &apiv1.Probe{ Handler: apiv1.Handler{ - Exec: &apiv1.ExecAction{ - Command: []string{"cat", path}, + HTTPGet: &apiv1.HTTPGetAction{ + Path: "/healthz", + Port: intstr.IntOrString{ + Type: intstr.Int, + IntVal: int32(watchdogPort), + }, }, }, - InitialDelaySeconds: 3, + InitialDelaySeconds: 0, TimeoutSeconds: 1, - PeriodSeconds: 10, + PeriodSeconds: 1, SuccessThreshold: 1, FailureThreshold: 3, }