install_hosa.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ---
  2. - name: Generate Hawkular Agent (HOSA) Cluster Role
  3. template:
  4. src: hawkular_openshift_agent_role.j2
  5. dest: "{{mktemp.stdout}}/templates/metrics-hawkular-openshift-agent-role.yaml"
  6. changed_when: no
  7. - name: Generate Hawkular Agent (HOSA) Service Account
  8. template:
  9. src: hawkular_openshift_agent_sa.j2
  10. dest: "{{mktemp.stdout}}/templates/metrics-hawkular-openshift-agent-sa.yaml"
  11. changed_when: no
  12. - name: Generate Hawkular Agent (HOSA) Daemon Set
  13. template:
  14. src: hawkular_openshift_agent_ds.j2
  15. dest: "{{mktemp.stdout}}/templates/metrics-hawkular-openshift-agent-ds.yaml"
  16. vars:
  17. node_selector: "{{openshift_metrics_hawkular_agent_nodeselector | default('') }}"
  18. changed_when: no
  19. - name: Generate the Hawkular Agent (HOSA) Configmap
  20. template:
  21. src: hawkular_openshift_agent_cm.j2
  22. dest: "{{mktemp.stdout}}/templates/metrics-hawkular-openshift-agent-cm.yaml"
  23. changed_when: no
  24. - name: Generate role binding for the hawkular-openshift-agent service account
  25. template:
  26. src: rolebinding.j2
  27. dest: "{{ mktemp.stdout }}/templates/metrics-hawkular-openshift-agent-rolebinding.yaml"
  28. vars:
  29. cluster: True
  30. obj_name: hawkular-openshift-agent-rb
  31. labels:
  32. metrics-infra: hawkular-agent
  33. roleRef:
  34. kind: ClusterRole
  35. name: hawkular-openshift-agent
  36. subjects:
  37. - kind: ServiceAccount
  38. name: hawkular-openshift-agent
  39. namespace: "{{openshift_metrics_hawkular_agent_namespace}}"
  40. changed_when: no