| ... | ... |
@@ -58,7 +58,14 @@ |
| 58 | 58 |
"securityContext": {
|
| 59 | 59 |
"capabilities": {},
|
| 60 | 60 |
"privileged": false |
| 61 |
- } |
|
| 61 |
+ }, |
|
| 62 |
+ "readinessProbe": {
|
|
| 63 |
+ "exec": {
|
|
| 64 |
+ "command": ["ldapsearch", "-x", "-b", "dc=example,dc=com"] |
|
| 65 |
+ }, |
|
| 66 |
+ "initialDelaySeconds": 5, |
|
| 67 |
+ "timeoutSeconds": 1 |
|
| 68 |
+ } |
|
| 62 | 69 |
} |
| 63 | 70 |
], |
| 64 | 71 |
"restartPolicy": "Always", |
| ... | ... |
@@ -88,9 +88,6 @@ server_ready_template=$(IFS=$""; echo "${server_ready_template[*]}") # re-format
|
| 88 | 88 |
# wait for LDAP server to be ready |
| 89 | 89 |
wait_for_command 'oc get pods -l deploymentconfig=openldap-server --template="${server_ready_template}" | grep "ReadyTrue "' $((60*TIME_SEC))
|
| 90 | 90 |
|
| 91 |
-# TODO(skuznets): readiness check is premature |
|
| 92 |
-sleep 10 |
|
| 93 |
- |
|
| 94 | 91 |
oc login -u system:admin -n openldap |
| 95 | 92 |
|
| 96 | 93 |
|