From af74b50d3a6d6ea420c0892ef76eca09ce60fcef Mon Sep 17 00:00:00 2001 From: Luis Tomas Bolivar Date: Wed, 8 Nov 2017 18:14:21 +0100 Subject: Add readiness probe to kuryr controller pod This commits adds a readiness probe to the kuryr controller when the kuryr ports pool functionality is enabled. This way the controller will not be set as ready until all the pre-created ports have been loaded into their respective pools and are ready to be used by the pods. --- roles/kuryr/templates/controller-deployment.yaml.j2 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/kuryr') diff --git a/roles/kuryr/templates/controller-deployment.yaml.j2 b/roles/kuryr/templates/controller-deployment.yaml.j2 index d970270b5..155d1faab 100644 --- a/roles/kuryr/templates/controller-deployment.yaml.j2 +++ b/roles/kuryr/templates/controller-deployment.yaml.j2 @@ -22,6 +22,13 @@ spec: - image: kuryr/controller:latest imagePullPolicy: IfNotPresent name: controller +{% if kuryr_openstack_enable_pools | default(false) %} + readinessProbe: + exec: + command: + - cat + - /tmp/pools_loaded +{% endif %} terminationMessagePath: "/dev/termination-log" # FIXME(dulek): This shouldn't be required, but without it selinux is # complaining about access to kuryr.conf. -- cgit v1.2.3