summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorewolinetz <ewolinet@redhat.com>2017-03-07 12:17:23 -0600
committerewolinetz <ewolinet@redhat.com>2017-03-07 12:17:23 -0600
commite10f7af55a3c311870eb65ac1ec4dd6c511ab5c0 (patch)
tree07c4ce463cb3fcada4d92151c7173ddfe4ba5e98 /roles
parentc03500de8b10e45bb54a006ddd6cd9ff459423a9 (diff)
downloadopenshift-e10f7af55a3c311870eb65ac1ec4dd6c511ab5c0.tar.gz
openshift-e10f7af55a3c311870eb65ac1ec4dd6c511ab5c0.tar.bz2
openshift-e10f7af55a3c311870eb65ac1ec4dd6c511ab5c0.tar.xz
openshift-e10f7af55a3c311870eb65ac1ec4dd6c511ab5c0.zip
Fixing plugin, nodeselectors, and secret pull check
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_logging/filter_plugins/openshift_logging.py3
-rw-r--r--roles/openshift_logging/tasks/install_curator.yaml2
-rw-r--r--roles/openshift_logging/tasks/install_elasticsearch.yaml8
-rw-r--r--roles/openshift_logging/tasks/install_kibana.yaml4
-rw-r--r--roles/openshift_logging/tasks/install_logging.yaml4
5 files changed, 15 insertions, 6 deletions
diff --git a/roles/openshift_logging/filter_plugins/openshift_logging.py b/roles/openshift_logging/filter_plugins/openshift_logging.py
index aa1c3738e..f0007dfc7 100644
--- a/roles/openshift_logging/filter_plugins/openshift_logging.py
+++ b/roles/openshift_logging/filter_plugins/openshift_logging.py
@@ -27,6 +27,9 @@ def entry_from_named_pair(register_pairs, key):
def map_from_pairs(source, delim="="):
''' Returns a dict given the source and delim delimited '''
+ if source == '':
+ return dict()
+
return dict(source.split(delim) for item in source.split(","))
# pylint: disable=too-few-public-methods
diff --git a/roles/openshift_logging/tasks/install_curator.yaml b/roles/openshift_logging/tasks/install_curator.yaml
index 5b474ff39..ab8e207f1 100644
--- a/roles/openshift_logging/tasks/install_curator.yaml
+++ b/roles/openshift_logging/tasks/install_curator.yaml
@@ -31,7 +31,7 @@
curator_cpu_limit: "{{openshift_logging_curator_cpu_limit }}"
curator_memory_limit: "{{openshift_logging_curator_memory_limit }}"
replicas: "{{curator_replica_count.stdout | default (0)}}"
- curator_node_selector: "{{openshift_logging_curator_nodeselector | default({}) }}"
+ curator_node_selector: "{{openshift_logging_curator_nodeselector | default({})}}"
check_mode: no
changed_when: no
diff --git a/roles/openshift_logging/tasks/install_elasticsearch.yaml b/roles/openshift_logging/tasks/install_elasticsearch.yaml
index 2941ecbfe..e908e802c 100644
--- a/roles/openshift_logging/tasks/install_elasticsearch.yaml
+++ b/roles/openshift_logging/tasks/install_elasticsearch.yaml
@@ -32,6 +32,10 @@
with_sequence: count={{ openshift_logging_es_cluster_size | int - openshift_logging_current_es_size | int }}
check_mode: no
+- set_fact: nodeselector="{{openshift_logging_es_nodeselector | default({}) }}"
+
+- debug: var=nodeselector
+
- name: Generate Elasticsearch DeploymentConfig
template: src=es.j2 dest={{mktemp.stdout}}/templates/logging-{{deploy_name}}-dc.yaml
vars:
@@ -45,7 +49,7 @@
volume_names: "{{es_pvc_pool | default([])}}"
pvc_claim: "{{(volume_names | length > item.0) | ternary(volume_names[item.0], None)}}"
deploy_name: "{{item.1}}"
- es_node_selector: "{{openshift_logging_es_nodeselector | default({})}}"
+ es_node_selector: "{{openshift_logging_es_nodeselector | default({}) }}"
with_indexed_items:
- "{{ es_dc_pool }}"
check_mode: no
@@ -121,7 +125,7 @@
es_recover_after_nodes: "{{es_ops_recover_after_nodes}}"
es_recover_expected_nodes: "{{es_ops_recover_expected_nodes}}"
openshift_logging_es_recover_after_time: "{{openshift_logging_es_ops_recover_after_time}}"
- es_node_selector: "{{openshift_logging_es_ops_nodeselector | default({})}}"
+ es_node_selector: "{{openshift_logging_es_ops_nodeselector | default({}) | map_from_pairs }}"
with_indexed_items:
- "{{ es_ops_dc_pool | default([]) }}"
when:
diff --git a/roles/openshift_logging/tasks/install_kibana.yaml b/roles/openshift_logging/tasks/install_kibana.yaml
index 3aeff2cac..52bdeb50d 100644
--- a/roles/openshift_logging/tasks/install_kibana.yaml
+++ b/roles/openshift_logging/tasks/install_kibana.yaml
@@ -35,7 +35,7 @@
kibana_proxy_cpu_limit: "{{openshift_logging_kibana_proxy_cpu_limit }}"
kibana_proxy_memory_limit: "{{openshift_logging_kibana_proxy_memory_limit }}"
replicas: "{{kibana_replica_count.stdout | default (0)}}"
- kibana_node_selector: "{{openshift_logging_kibana_nodeselector | default({}) }}"
+ kibana_node_selector: "{{openshift_logging_kibana_nodeselector | default({})}}"
check_mode: no
changed_when: no
@@ -54,7 +54,7 @@
kibana_proxy_cpu_limit: "{{openshift_logging_kibana_ops_proxy_cpu_limit }}"
kibana_proxy_memory_limit: "{{openshift_logging_kibana_ops_proxy_memory_limit }}"
replicas: "{{kibana_ops_replica_count.stdout | default (0)}}"
- kibana_node_selector: "{{openshift_logging_kibana_ops_nodeselector | default({}) }}"
+ kibana_node_selector: "{{openshift_logging_kibana_ops_nodeselector | default({})}}"
when: openshift_logging_use_ops | bool
check_mode: no
changed_when: no
diff --git a/roles/openshift_logging/tasks/install_logging.yaml b/roles/openshift_logging/tasks/install_logging.yaml
index e23c3f9f1..59ba05da3 100644
--- a/roles/openshift_logging/tasks/install_logging.yaml
+++ b/roles/openshift_logging/tasks/install_logging.yaml
@@ -76,7 +76,9 @@
register: link_pull_secret
loop_control:
loop_var: sa_account
- when: openshift_logging_image_pull_secret is defined
+ when:
+ - openshift_logging_image_pull_secret is defined
+ - openshift_logging_image_pull_secret is not None
failed_when: link_pull_secret.rc != 0
- name: Scaling up cluster