From 108a42cbbdbfc8094d1d8bf8d0d8826adfdf760d Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 22 May 2017 09:42:19 -0700 Subject: Create logging deployments with non-zero replica counts When we currently create the set of logging `DeploymentConfig`s, we create them with zero desired replicas. This causes the deployment to immediately succeed as there is no work to be done. This inhibits our ability to use nice CLI UX features like `oc rollout status` to monitor the logging stack deployments. Instead, we should can create the configs with the correct number of replicas in the first place and stop using `oc scale` to bring them up after the fact. Signed-off-by: Steve Kuznetsov --- roles/openshift_logging_kibana/templates/kibana.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles/openshift_logging_kibana/templates') diff --git a/roles/openshift_logging_kibana/templates/kibana.j2 b/roles/openshift_logging_kibana/templates/kibana.j2 index ea506b12b..2298aa6d5 100644 --- a/roles/openshift_logging_kibana/templates/kibana.j2 +++ b/roles/openshift_logging_kibana/templates/kibana.j2 @@ -7,7 +7,7 @@ metadata: component: "{{ component }}" logging-infra: "{{ logging_component }}" spec: - replicas: {{ replicas | default(0) }} + replicas: {{ replicas | default(1) }} selector: provider: openshift component: "{{ component }}" -- cgit v1.2.3 From 2740dff958cb3c619ca508d83edb3b351f83c31d Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Mon, 22 May 2017 09:45:09 -0700 Subject: 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 --- roles/openshift_logging_kibana/templates/kibana.j2 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/openshift_logging_kibana/templates') diff --git a/roles/openshift_logging_kibana/templates/kibana.j2 b/roles/openshift_logging_kibana/templates/kibana.j2 index 2298aa6d5..f8043812b 100644 --- a/roles/openshift_logging_kibana/templates/kibana.j2 +++ b/roles/openshift_logging_kibana/templates/kibana.j2 @@ -63,6 +63,13 @@ spec: - name: kibana mountPath: /etc/kibana/keys readOnly: true + readinessProbe: + exec: + command: + - "/usr/share/kibana/probe/readiness.sh" + initialDelaySeconds: 5 + timeoutSeconds: 4 + periodSeconds: 5 - name: "kibana-proxy" image: {{ proxy_image }} -- cgit v1.2.3