Skip to content

Commit

Permalink
feat(notebook-controller): add readiness probe (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
jumana-s authored and Wendy V Gaultier committed Jul 14, 2022
1 parent 6b492f8 commit 90e88bb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions components/notebook-controller/controllers/notebook_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,18 @@ func generateStatefulSet(instance *v1beta1.Notebook) *appsv1.StatefulSet {
Value: "/notebook/" + instance.Namespace + "/" + instance.Name,
})

// Add readiness probe
if container.ReadinessProbe == nil {
container.ReadinessProbe = &corev1.Probe{
Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/notebook/" + instance.Namespace + "/" + instance.Name,
Port: intstr.FromInt(DefaultContainerPort),
},
},
}
}

// For some platforms (like OpenShift), adding fsGroup: 100 is troublesome.
// This allows for those platforms to bypass the automatic addition of the fsGroup
// and will allow for the Pod Security Policy controller to make an appropriate choice
Expand Down

0 comments on commit 90e88bb

Please sign in to comment.