logging-metrics-role.j2 705 B

12345678910111213141516171819202122232425262728293031
  1. ---
  2. apiVersion: v1
  3. kind: List
  4. items:
  5. - apiVersion: rbac.authorization.k8s.io/v1beta1
  6. kind: Role
  7. metadata:
  8. annotations:
  9. rbac.authorization.kubernetes.io/autoupdate: "true"
  10. name: prometheus-metrics-viewer
  11. namespace: {{ namespace }}
  12. rules:
  13. - apiGroups:
  14. - metrics.openshift.io
  15. resources:
  16. - prometheus
  17. verbs:
  18. - view
  19. - apiVersion: rbac.authorization.k8s.io/v1beta1
  20. kind: RoleBinding
  21. metadata:
  22. name: prometheus-metrics-viewer
  23. namespace: {{ namespace }}
  24. roleRef:
  25. apiGroup: rbac.authorization.k8s.io
  26. kind: Role
  27. name: prometheus-metrics-viewer
  28. subjects:
  29. - kind: ServiceAccount
  30. namespace: {{ role_namespace }}
  31. name: {{ role_user }}