roles.yaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. apiVersion: rbac.authorization.k8s.io/v1
  2. kind: Role
  3. metadata:
  4. name: system:controller:glbc
  5. namespace: kube-system
  6. labels:
  7. addonmanager.kubernetes.io/mode: Reconcile
  8. rules:
  9. - apiGroups: [""]
  10. resources: ["configmaps"]
  11. verbs: ["get", "list", "watch", "update", "create", "patch"]
  12. ---
  13. apiVersion: rbac.authorization.k8s.io/v1
  14. kind: ClusterRole
  15. metadata:
  16. name: system:controller:glbc
  17. labels:
  18. addonmanager.kubernetes.io/mode: Reconcile
  19. rules:
  20. - apiGroups: [""]
  21. resources: ["secrets"]
  22. verbs: ["get"]
  23. - apiGroups: [""]
  24. resources: ["events"]
  25. verbs: ["get", "list", "watch", "update", "create", "patch"]
  26. - apiGroups: [""]
  27. resources: ["endpoints", "services", "pods", "nodes", "namespaces"]
  28. verbs: ["get", "list", "watch"]
  29. # TODO: switch to patch services/status
  30. # https://github.com/kubernetes/ingress-gce/blob/4918eb2f0f484f09ac9e5a975907a9b16ed2b344/pkg/neg/controller.go#L339-L342
  31. # https://github.com/kubernetes/ingress-gce/blob/4918eb2f0f484f09ac9e5a975907a9b16ed2b344/pkg/neg/controller.go#L359-L361
  32. - apiGroups: [""]
  33. resources: ["services"]
  34. verbs: ["update", "patch"]
  35. - apiGroups: ["extensions", "networking.k8s.io"]
  36. resources: ["ingresses"]
  37. verbs: ["get", "list", "watch"]
  38. # For now, GLBC annotates ingress resources with various state and statuses:
  39. # https://github.com/kubernetes/ingress-gce/blob/50d49b077d9ab4362a02fae05f94e433cd3f08dc/pkg/controller/controller.go#L579
  40. # TODO(rramkumar1): Remove unnecessary `update` permission once statuses are propagated through `ingresses/status`
  41. - apiGroups: ["extensions", "networking.k8s.io"]
  42. resources: ["ingresses"]
  43. verbs: ["update"]
  44. - apiGroups: ["extensions", "networking.k8s.io"]
  45. resources: ["ingresses/status"]
  46. verbs: ["update"]
  47. # GLBC ensures that the `cloud.google.com/backendconfigs` CRD exists in a desired state:
  48. # https://github.com/kubernetes/ingress-gce/blob/4918eb2f0f484f09ac9e5a975907a9b16ed2b344/cmd/glbc/main.go#L93
  49. # TODO(rramkumar1): https://github.com/kubernetes/ingress-gce/issues/744
  50. - apiGroups: ["apiextensions.k8s.io"]
  51. resources: ["customresourcedefinitions"]
  52. verbs: ["get", "list", "watch", "update", "create", "patch"]
  53. - apiGroups: ["cloud.google.com"]
  54. resources: ["backendconfigs"]
  55. verbs: ["get", "list", "watch", "update", "create", "patch"]