console-rbac-template.yaml 930 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. apiVersion: template.openshift.io/v1
  2. kind: Template
  3. metadata:
  4. name: web-console-server-rbac
  5. parameters:
  6. - name: NAMESPACE
  7. # This namespace cannot be changed. Only `openshift-web-console` is supported.
  8. value: openshift-web-console
  9. objects:
  10. # allow grant powers to the webconsole server for cluster inspection
  11. - apiVersion: rbac.authorization.k8s.io/v1beta1
  12. kind: ClusterRole
  13. metadata:
  14. name: system:openshift:web-console-server
  15. rules:
  16. - apiGroups:
  17. - "servicecatalog.k8s.io"
  18. resources:
  19. - clusterservicebrokers
  20. verbs:
  21. - get
  22. - list
  23. - watch
  24. # Grant the service account for the web console
  25. - apiVersion: rbac.authorization.k8s.io/v1beta1
  26. kind: ClusterRoleBinding
  27. metadata:
  28. name: system:openshift:web-console-server
  29. roleRef:
  30. kind: ClusterRole
  31. name: system:openshift:web-console-server
  32. subjects:
  33. - kind: ServiceAccount
  34. namespace: ${NAMESPACE}
  35. name: webconsole