summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics/templates
diff options
context:
space:
mode:
authorJeff Cantrill <jcantril@redhat.com>2017-02-06 14:01:09 -0500
committerJeff Cantrill <jcantril@redhat.com>2017-02-06 14:59:46 -0500
commit21966b722781bb04b0b7a374685e428b77fd4f0a (patch)
tree00b6e7121c9600d1934cdfd29b0b2d90d4a20cf5 /roles/openshift_metrics/templates
parent87b0f005ee280540ec7afbd39f1a6b99a4c60ea3 (diff)
downloadopenshift-21966b722781bb04b0b7a374685e428b77fd4f0a.tar.gz
openshift-21966b722781bb04b0b7a374685e428b77fd4f0a.tar.bz2
openshift-21966b722781bb04b0b7a374685e428b77fd4f0a.tar.xz
openshift-21966b722781bb04b0b7a374685e428b77fd4f0a.zip
fix 1406057. Allow openshift_metrics nodeselectors for components
Diffstat (limited to 'roles/openshift_metrics/templates')
-rw-r--r--roles/openshift_metrics/templates/hawkular_cassandra_rc.j26
-rw-r--r--roles/openshift_metrics/templates/hawkular_metrics_rc.j26
-rw-r--r--roles/openshift_metrics/templates/heapster.j26
3 files changed, 18 insertions, 0 deletions
diff --git a/roles/openshift_metrics/templates/hawkular_cassandra_rc.j2 b/roles/openshift_metrics/templates/hawkular_cassandra_rc.j2
index abd4ff939..876cb1915 100644
--- a/roles/openshift_metrics/templates/hawkular_cassandra_rc.j2
+++ b/roles/openshift_metrics/templates/hawkular_cassandra_rc.j2
@@ -19,6 +19,12 @@ spec:
type: hawkular-cassandra
spec:
serviceAccount: cassandra
+{% if node_selector is iterable and node_selector | length > 0 %}
+ nodeSelector:
+{% for key, value in node_selector.iteritems() %}
+ {{key}}: "{{value}}"
+{% endfor %}
+{% endif %}
containers:
- image: "{{ openshift_metrics_image_prefix }}metrics-cassandra:{{ openshift_metrics_image_version }}"
name: hawkular-cassandra-{{ node }}
diff --git a/roles/openshift_metrics/templates/hawkular_metrics_rc.j2 b/roles/openshift_metrics/templates/hawkular_metrics_rc.j2
index f78621674..d39f1b43a 100644
--- a/roles/openshift_metrics/templates/hawkular_metrics_rc.j2
+++ b/roles/openshift_metrics/templates/hawkular_metrics_rc.j2
@@ -17,6 +17,12 @@ spec:
name: hawkular-metrics
spec:
serviceAccount: hawkular
+{% if node_selector is iterable and node_selector | length > 0 %}
+ nodeSelector:
+{% for key, value in node_selector.iteritems() %}
+ {{key}}: "{{value}}"
+{% endfor %}
+{% endif %}
containers:
- image: {{openshift_metrics_image_prefix}}metrics-hawkular-metrics:{{openshift_metrics_image_version}}
name: hawkular-metrics
diff --git a/roles/openshift_metrics/templates/heapster.j2 b/roles/openshift_metrics/templates/heapster.j2
index eeca03be0..7c837db4d 100644
--- a/roles/openshift_metrics/templates/heapster.j2
+++ b/roles/openshift_metrics/templates/heapster.j2
@@ -18,6 +18,12 @@ spec:
name: heapster
spec:
serviceAccountName: heapster
+{% if node_selector is iterable and node_selector | length > 0 %}
+ nodeSelector:
+{% for key, value in node_selector.iteritems() %}
+ {{key}}: "{{value}}"
+{% endfor %}
+{% endif %}
containers:
- name: heapster
image: {{openshift_metrics_image_prefix}}metrics-heapster:{{openshift_metrics_image_version}}