You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.3 KiB

  1. ---
  2. kind: ClusterRole
  3. apiVersion: rbac.authorization.k8s.io/v1beta1
  4. metadata:
  5. name: calico-kube-controllers
  6. namespace: kube-system
  7. rules:
  8. {% if calico_datastore == "etcd" %}
  9. - apiGroups:
  10. - ""
  11. - extensions
  12. resources:
  13. - pods
  14. - namespaces
  15. - networkpolicies
  16. - nodes
  17. - serviceaccounts
  18. verbs:
  19. - watch
  20. - list
  21. - apiGroups:
  22. - networking.k8s.io
  23. resources:
  24. - networkpolicies
  25. verbs:
  26. - watch
  27. - list
  28. {% elif calico_datastore == "kdd" %}
  29. # Nodes are watched to monitor for deletions.
  30. - apiGroups: [""]
  31. resources:
  32. - nodes
  33. verbs:
  34. - watch
  35. - list
  36. - get
  37. # Pods are queried to check for existence.
  38. - apiGroups: [""]
  39. resources:
  40. - pods
  41. verbs:
  42. - get
  43. # IPAM resources are manipulated when nodes are deleted.
  44. - apiGroups: ["crd.projectcalico.org"]
  45. resources:
  46. - ippools
  47. verbs:
  48. - list
  49. - apiGroups: ["crd.projectcalico.org"]
  50. resources:
  51. - blockaffinities
  52. - ipamblocks
  53. - ipamhandles
  54. verbs:
  55. - get
  56. - list
  57. - create
  58. - update
  59. - delete
  60. # Needs access to update clusterinformations.
  61. - apiGroups: ["crd.projectcalico.org"]
  62. resources:
  63. - clusterinformations
  64. verbs:
  65. - get
  66. - create
  67. - update
  68. {% endif %}