Merge "Make sure we never have 2 kuryr-controllers"

This commit is contained in:
Zuul 2018-11-08 12:36:56 +00:00 committed by Gerrit Code Review
commit e215a0ba4f
1 changed files with 15 additions and 0 deletions

View File

@ -522,6 +522,21 @@ metadata:
namespace: kube-system
spec:
replicas: ${KURYR_CONTROLLER_REPLICAS:-1}
EOF
# When running without HA we should make sure that we won't have more than
# one kuryr-controller pod in the deployment.
if [ "$controller_ha" == "False" ]; then
cat >> "${output_dir}/controller_deployment.yml" << EOF
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
EOF
fi
cat >> "${output_dir}/controller_deployment.yml" << EOF
template:
metadata:
labels: