Ensure readiness probe is not always enabled

This patch ensures that readiness probe is only added when
KURYR_USE_PORTS_POOLS is set

Closes-Bug: #1733832
Change-Id: Id35e4954d1265e758e3b7a05644d749c85f62b74
This commit is contained in:
Luis Tomas Bolivar 2017-11-28 16:29:35 +01:00
parent 4fcd511143
commit 1aebde0a1f
2 changed files with 2 additions and 1 deletions

View File

@ -439,7 +439,7 @@ EOF
# Add readiness probe if ports pool functionality is enabled. The rationale
# behind is to make the controller not ready until the precreated ports are
# loaded into the pools
if [ "$readiness_probe" ]; then
if [ "$readiness_probe" == "True" ]; then
cat >> "${output_dir}/controller_deployment.yml" << EOF
readinessProbe:
exec:

View File

@ -113,6 +113,7 @@ function generate_containerized_kuryr_resources {
local output_dir="${DATA_DIR}/kuryr-kubernetes"
generate_kuryr_configmap $output_dir $KURYR_CONFIG $KURYR_CNI_CONFIG
generate_kuryr_service_account $output_dir
KURYR_USE_PORTS_POOLS=$(trueorfalse False KURYR_USE_PORTS_POOLS)
generate_controller_deployment $output_dir $KURYR_USE_PORTS_POOLS
generate_cni_daemon_set $output_dir $CNI_BIN_DIR $CNI_CONF_DIR
}