summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-07-28 17:04:30 -0400
committerGitHub <noreply@github.com>2017-07-28 17:04:30 -0400
commit841ec238782aa382eed3d69ce6a2af62a82bfd43 (patch)
tree59e4b9f8f3d62db0381fb5824096700adaa22c78
parentee4524068c10df43eeb65bf2ab6606140743a4d5 (diff)
parenta92da1841e571c6219dcdb9c0be2862104eab115 (diff)
downloadopenshift-841ec238782aa382eed3d69ce6a2af62a82bfd43.tar.gz
openshift-841ec238782aa382eed3d69ce6a2af62a82bfd43.tar.bz2
openshift-841ec238782aa382eed3d69ce6a2af62a82bfd43.tar.xz
openshift-841ec238782aa382eed3d69ce6a2af62a82bfd43.zip
Merge pull request #4931 from ewolinetz/bz1476195
Updating metrics role to create serviceaccounts and roles immediately
-rw-r--r--roles/openshift_metrics/tasks/generate_rolebindings.yaml9
-rw-r--r--roles/openshift_metrics/tasks/generate_serviceaccounts.yaml12
2 files changed, 21 insertions, 0 deletions
diff --git a/roles/openshift_metrics/tasks/generate_rolebindings.yaml b/roles/openshift_metrics/tasks/generate_rolebindings.yaml
index 1304ab8b5..9882b1eb5 100644
--- a/roles/openshift_metrics/tasks/generate_rolebindings.yaml
+++ b/roles/openshift_metrics/tasks/generate_rolebindings.yaml
@@ -37,3 +37,12 @@
src: hawkular_metrics_role.j2
dest: "{{ mktemp.stdout }}/templates/hawkular-cluster-role.yaml"
changed_when: no
+
+- name: Set hawkular cluster roles
+ oc_obj:
+ name: hawkular-metrics
+ namespace: "{{ openshift_metrics_hawkular_agent_namespace }}"
+ kind: clusterrole
+ files:
+ - "{{ mktemp.stdout }}/templates/hawkular-cluster-role.yaml"
+ delete_after: true
diff --git a/roles/openshift_metrics/tasks/generate_serviceaccounts.yaml b/roles/openshift_metrics/tasks/generate_serviceaccounts.yaml
index e9d70f74f..db27680fe 100644
--- a/roles/openshift_metrics/tasks/generate_serviceaccounts.yaml
+++ b/roles/openshift_metrics/tasks/generate_serviceaccounts.yaml
@@ -13,3 +13,15 @@
- name: cassandra
secret: hawkular-cassandra-secrets
changed_when: no
+
+- name: Set serviceaccounts for hawkular metrics/cassandra
+ oc_obj:
+ name: "{{ item }}"
+ kind: serviceaccount
+ namespace: "{{ openshift_metrics_hawkular_agent_namespace }}"
+ files:
+ - "{{ mktemp.stdout }}/templates/metrics-{{ item }}-sa.yaml"
+ delete_after: true
+ with_items:
+ - hawkular
+ - cassandra