diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-02-20 10:58:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-20 10:58:40 -0500 |
commit | da29eaf72d89933d65f57e67a148bfdf0bff7571 (patch) | |
tree | de8be5c2e9ab30af3d50607496604705f3a4a671 /roles/openshift_hosted | |
parent | bcc6a80e28216950bd2f1741591813a1f2b6dbef (diff) | |
parent | f92ea7c375239dce121154408987632d08d8d45f (diff) | |
download | openshift-da29eaf72d89933d65f57e67a148bfdf0bff7571.tar.gz openshift-da29eaf72d89933d65f57e67a148bfdf0bff7571.tar.bz2 openshift-da29eaf72d89933d65f57e67a148bfdf0bff7571.tar.xz openshift-da29eaf72d89933d65f57e67a148bfdf0bff7571.zip |
Merge pull request #3340 from etsauer/scale-router
Making router pods scale with infra nodes
Diffstat (limited to 'roles/openshift_hosted')
-rw-r--r-- | roles/openshift_hosted/tasks/router/router.yml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/openshift_hosted/tasks/router/router.yml b/roles/openshift_hosted/tasks/router/router.yml index b944fa522..3d5713d6b 100644 --- a/roles/openshift_hosted/tasks/router/router.yml +++ b/roles/openshift_hosted/tasks/router/router.yml @@ -78,3 +78,27 @@ changed_when: "'service exists' not in openshift_hosted_router_results.stdout" failed_when: "openshift_hosted_router_results.rc != 0 and 'service exists' not in openshift_hosted_router_results.stdout and 'deployment_config' not in openshift_hosted_router_results.stderr and 'service' not in openshift_hosted_router_results.stderr" when: replicas | int > 0 + +- command: > + {{ openshift.common.client_binary }} + {% if openshift.hosted.router.name | default(none) is not none -%} + get dc/{{ openshift.hosted.router.name }} + {% else %} + get dc/router + {% endif%} + --template=\\{\\{.spec.replicas\\}\\} + --namespace={{ openshift.hosted.router.namespace | default('default') }} + register: current_replicas + when: replicas | int > 0 + +- name: Ensure router replica count matches desired + command: > + {{ openshift.common.client_binary }} + scale --replicas={{ replicas }} + {% if openshift.hosted.router.name | default(none) is not none -%} + dc/{{ openshift.hosted.router.name }} + {% else %} + dc/router + {% endif%} + --namespace={{ openshift.hosted.router.namespace | default('default') }} + when: replicas | int > 0 and replicas | int != current_replicas.stdout | int |