clusterrole.yaml 989 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {{- if and .Values.rbac.create (empty .Values.server.useExistingClusterRoleName) -}}
  2. apiVersion: {{ template "rbac.apiVersion" . }}
  3. kind: ClusterRole
  4. metadata:
  5. labels:
  6. {{- include "prometheus.server.labels" . | nindent 4 }}
  7. name: {{ template "prometheus.server.fullname" . }}
  8. rules:
  9. {{- if .Values.podSecurityPolicy.enabled }}
  10. - apiGroups:
  11. - extensions
  12. resources:
  13. - podsecuritypolicies
  14. verbs:
  15. - use
  16. resourceNames:
  17. - {{ template "prometheus.server.fullname" . }}
  18. {{- end }}
  19. - apiGroups:
  20. - ""
  21. resources:
  22. - nodes
  23. - nodes/proxy
  24. - nodes/metrics
  25. - services
  26. - endpoints
  27. - pods
  28. - ingresses
  29. - configmaps
  30. verbs:
  31. - get
  32. - list
  33. - watch
  34. - apiGroups:
  35. - "extensions"
  36. - "networking.k8s.io"
  37. resources:
  38. - ingresses/status
  39. - ingresses
  40. verbs:
  41. - get
  42. - list
  43. - watch
  44. - nonResourceURLs:
  45. - "/metrics"
  46. verbs:
  47. - get
  48. {{- end }}