Переглянути джерело

Add a readiness probe to the Kibana container

In order to ensure that the Kubernetes machinery can determine when the
Kibana Pods are becoming ready, we need to add a readiness probe to the
Containers that make up those pods. The Kibana readiness probe simply
hits the base URL at `http://localhost:5601/` and expects a 200.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Steve Kuznetsov 7 роки тому
батько
коміт
2740dff958
1 змінених файлів з 7 додано та 0 видалено
  1. 7 0
      roles/openshift_logging_kibana/templates/kibana.j2

+ 7 - 0
roles/openshift_logging_kibana/templates/kibana.j2

@@ -63,6 +63,13 @@ spec:
             - name: kibana
             - name: kibana
               mountPath: /etc/kibana/keys
               mountPath: /etc/kibana/keys
               readOnly: true
               readOnly: true
+          readinessProbe:
+            exec:
+              command:
+              - "/usr/share/kibana/probe/readiness.sh"
+            initialDelaySeconds: 5
+            timeoutSeconds: 4
+            periodSeconds: 5
         -
         -
           name: "kibana-proxy"
           name: "kibana-proxy"
           image: {{ proxy_image }}
           image: {{ proxy_image }}