Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #152 from ngtuna/pubsub-liveness
Browse files Browse the repository at this point in the history
temporary remove liveness probe check for pubsub func
  • Loading branch information
ngtuna authored May 15, 2017
2 parents 0627eb0 + 33ed7d2 commit 3a0efed
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions pkg/utils/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const (
pubsubRuntime = "skippbox/kubeless-event-consumer:0.0.5"
nodejsRuntime = "rosskukulinski/kubeless-nodejs:0.0.0"
rubyRuntime = "jbianquettibitnami/kubeless-ruby:0.0.0"
pubsubFunc = "PubSub"
)

// GetClient returns a k8s clientset to the request from inside of cluster
Expand Down Expand Up @@ -306,16 +307,6 @@ func CreateK8sResources(ns, name string, spec *spec.FunctionSpec, client *kubern
MountPath: "/kubeless",
},
},
LivenessProbe: &v1.Probe{
InitialDelaySeconds: int32(3),
PeriodSeconds: int32(3),
Handler: v1.Handler{
HTTPGet: &v1.HTTPGetAction{
Path: "/healthz",
Port: intstr.FromInt(8080),
},
},
},
},
},
Volumes: []v1.Volume{
Expand Down Expand Up @@ -347,6 +338,20 @@ func CreateK8sResources(ns, name string, spec *spec.FunctionSpec, client *kubern
addInitContainerAnnotation(dpm)
}

if spec.Type != pubsubFunc {
livenessProbe := &v1.Probe{
InitialDelaySeconds: int32(3),
PeriodSeconds: int32(3),
Handler: v1.Handler{
HTTPGet: &v1.HTTPGetAction{
Path: "/healthz",
Port: intstr.FromInt(8080),
},
},
}
dpm.Spec.Template.Spec.Containers[0].LivenessProbe = livenessProbe
}

_, err = client.Extensions().Deployments(ns).Create(dpm)
if err != nil {
return err
Expand Down

0 comments on commit 3a0efed

Please sign in to comment.