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

Commit

Permalink
Adds liveness probe for node-controller
Browse files Browse the repository at this point in the history
We need one to restart node-controller if it's stuck with broken
tcp connections.

Depend:
giantswarm/kvm-operator-node-controller#10
  • Loading branch information
Roman Sokolkov committed Dec 11, 2017
1 parent 1e84f54 commit 5d32b43
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions service/resource/deploymentv2/node_controller_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/giantswarm/apiextensions/pkg/apis/provider/v1alpha1"
apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
apiv1 "k8s.io/client-go/pkg/api/v1"
extensionsv1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"

Expand Down Expand Up @@ -60,6 +61,19 @@ func newNodeControllerDeployment(customObject v1alpha1.KVMConfig) (*extensionsv1
Value: keyv2.ClusterID(customObject),
},
},
LivenessProbe: &apiv1.Probe{
InitialDelaySeconds: 15,
TimeoutSeconds: 1,
PeriodSeconds: 10,
FailureThreshold: 3,
SuccessThreshold: 1,
Handler: apiv1.Handler{
HTTPGet: &apiv1.HTTPGetAction{
Path: keyv2.HealthEndpoint,
Port: intstr.IntOrString{IntVal: 8080},
},
},
},
},
},
},
Expand Down

0 comments on commit 5d32b43

Please sign in to comment.