diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-12-14 17:26:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-14 17:26:29 -0500 |
commit | 579a246138b20356cc9d0eab33f7880514bf4d87 (patch) | |
tree | ff24c2bf0bc9036211a43d1c590b0b499984256e | |
parent | 49d1242ce0a3413678642c5d8be5197c46bd817c (diff) | |
parent | 9d36de22bcea00b7a4b76906abfdbf0f4d6beeb7 (diff) | |
download | openshift-579a246138b20356cc9d0eab33f7880514bf4d87.tar.gz openshift-579a246138b20356cc9d0eab33f7880514bf4d87.tar.bz2 openshift-579a246138b20356cc9d0eab33f7880514bf4d87.tar.xz openshift-579a246138b20356cc9d0eab33f7880514bf4d87.zip |
Merge pull request #6386 from jim-minter/spinning_tsb_pods
prevent TSB pods from spinning on inappropriate nodes
-rw-r--r-- | files/origin-components/apiserver-template.yaml | 3 | ||||
-rw-r--r-- | roles/template_service_broker/defaults/main.yml | 1 | ||||
-rw-r--r-- | roles/template_service_broker/tasks/install.yml | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/files/origin-components/apiserver-template.yaml b/files/origin-components/apiserver-template.yaml index 1b42597af..035e4734b 100644 --- a/files/origin-components/apiserver-template.yaml +++ b/files/origin-components/apiserver-template.yaml @@ -15,6 +15,8 @@ parameters: apiVersion: config.templateservicebroker.openshift.io/v1 templateNamespaces: - openshift +- name: NODE_SELECTOR + value: "{}" objects: # to create the tsb server @@ -59,6 +61,7 @@ objects: path: /healthz port: 8443 scheme: HTTPS + nodeSelector: "${{NODE_SELECTOR}}" volumes: - name: serving-cert secret: diff --git a/roles/template_service_broker/defaults/main.yml b/roles/template_service_broker/defaults/main.yml index 421b4ecf9..c32872d24 100644 --- a/roles/template_service_broker/defaults/main.yml +++ b/roles/template_service_broker/defaults/main.yml @@ -3,3 +3,4 @@ template_service_broker_remove: False template_service_broker_install: True openshift_template_service_broker_namespaces: ['openshift'] +template_service_broker_selector: { "region": "infra" } diff --git a/roles/template_service_broker/tasks/install.yml b/roles/template_service_broker/tasks/install.yml index 99a58baff..1253c1133 100644 --- a/roles/template_service_broker/tasks/install.yml +++ b/roles/template_service_broker/tasks/install.yml @@ -15,6 +15,8 @@ - oc_project: name: openshift-template-service-broker state: present + node_selector: + - "" - command: mktemp -d /tmp/tsb-ansible-XXXXXX register: mktemp @@ -45,6 +47,7 @@ {{ openshift.common.client_binary }} process -f "{{ mktemp.stdout }}/{{ __tsb_template_file }}" --param API_SERVER_CONFIG="{{ config['content'] | b64decode }}" --param IMAGE="{{ template_service_broker_prefix }}{{ template_service_broker_image_name }}:{{ template_service_broker_version }}" + --param NODE_SELECTOR={{ template_service_broker_selector | to_json | quote }} | {{ openshift.common.client_binary }} apply -f - # reconcile with rbac |