ソースを参照

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.
Luis Tomas Bolivar 7 年 前
コミット
af74b50d3a
1 ファイル変更7 行追加0 行削除
  1. 7 0
      roles/kuryr/templates/controller-deployment.yaml.j2

+ 7 - 0
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.