diff options
author | ewolinetz <ewolinet@redhat.com> | 2017-07-28 10:59:56 -0500 |
---|---|---|
committer | ewolinetz <ewolinet@redhat.com> | 2017-07-28 10:59:56 -0500 |
commit | a92da1841e571c6219dcdb9c0be2862104eab115 (patch) | |
tree | b890bc7ffce3f8026014d18d5a75b6a533fae908 | |
parent | 8bf8f395ac0d83b7aa97b8388639ae590bf78e6f (diff) | |
download | openshift-a92da1841e571c6219dcdb9c0be2862104eab115.tar.gz openshift-a92da1841e571c6219dcdb9c0be2862104eab115.tar.bz2 openshift-a92da1841e571c6219dcdb9c0be2862104eab115.tar.xz openshift-a92da1841e571c6219dcdb9c0be2862104eab115.zip |
Updating metrics role to create serviceaccounts and roles immediately
-rw-r--r-- | roles/openshift_metrics/tasks/generate_rolebindings.yaml | 9 | ||||
-rw-r--r-- | roles/openshift_metrics/tasks/generate_serviceaccounts.yaml | 12 |
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 |