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.

49 lines
1.5 KiB

  1. ---
  2. apiVersion: rbac.authorization.k8s.io/v1
  3. kind: Role
  4. metadata:
  5. name: ingress-nginx
  6. namespace: {{ ingress_nginx_namespace }}
  7. labels:
  8. app.kubernetes.io/name: ingress-nginx
  9. app.kubernetes.io/part-of: ingress-nginx
  10. rules:
  11. - apiGroups: [""]
  12. resources: ["namespaces"]
  13. verbs: ["get"]
  14. - apiGroups: [""]
  15. resources: ["configmaps", "pods", "secrets", "endpoints"]
  16. verbs: ["get", "list", "watch"]
  17. - apiGroups: [""]
  18. resources: ["services"]
  19. verbs: ["get", "list", "update", "watch"]
  20. - apiGroups: ["extensions", "networking.k8s.io"]
  21. resources: ["ingresses"]
  22. verbs: ["get", "list", "watch"]
  23. - apiGroups: ["extensions", "networking.k8s.io"]
  24. resources: ["ingresses/status"]
  25. verbs: ["update"]
  26. - apiGroups: ["networking.k8s.io"]
  27. resources: ["ingressclasses"]
  28. verbs: ["get", "list", "watch"]
  29. - apiGroups: [""]
  30. resources: ["configmaps"]
  31. # Defaults to "<election-id>-<ingress-class>"
  32. # Here: "<ingress-controller-leader>-<nginx>"
  33. # This has to be adapted if you change either parameter
  34. # when launching the nginx-ingress-controller.
  35. resourceNames: ["ingress-controller-leader-nginx"]
  36. verbs: ["get", "update"]
  37. - apiGroups: [""]
  38. resources: ["configmaps"]
  39. verbs: ["create"]
  40. - apiGroups: [""]
  41. resources: ["endpoints"]
  42. verbs: ["create", "get", "update"]
  43. - apiGroups: [""]
  44. resources: ["events"]
  45. verbs: ["create", "patch"]
  46. - apiGroups: ["policy"]
  47. resourceNames: ["ingress-nginx"]
  48. resources: ["podsecuritypolicies"]
  49. verbs: ["use"]