cert-controller-rbac.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. {{- if and .Values.certController.create .Values.certController.rbac.create (not .Values.webhook.certManager.enabled) -}}
  2. apiVersion: rbac.authorization.k8s.io/v1
  3. kind: ClusterRole
  4. metadata:
  5. name: {{ include "external-secrets.fullname" . }}-cert-controller
  6. labels:
  7. {{- include "external-secrets-cert-controller.labels" . | nindent 4 }}
  8. rules:
  9. - apiGroups:
  10. - "apiextensions.k8s.io"
  11. resources:
  12. - "customresourcedefinitions"
  13. verbs:
  14. - "get"
  15. - "list"
  16. - "watch"
  17. - "update"
  18. - "patch"
  19. - apiGroups:
  20. - "admissionregistration.k8s.io"
  21. resources:
  22. - "validatingwebhookconfigurations"
  23. verbs:
  24. - "get"
  25. - "list"
  26. - "watch"
  27. - "update"
  28. - "patch"
  29. - apiGroups:
  30. - ""
  31. resources:
  32. - "endpoints"
  33. verbs:
  34. - "list"
  35. - "get"
  36. - "watch"
  37. - apiGroups:
  38. - ""
  39. resources:
  40. - "events"
  41. verbs:
  42. - "create"
  43. - "patch"
  44. - apiGroups:
  45. - ""
  46. resources:
  47. - "secrets"
  48. verbs:
  49. - "get"
  50. - "list"
  51. - "watch"
  52. - "update"
  53. - "patch"
  54. - apiGroups:
  55. - "coordination.k8s.io"
  56. resources:
  57. - "leases"
  58. verbs:
  59. - "get"
  60. - "create"
  61. - "update"
  62. - "patch"
  63. ---
  64. apiVersion: rbac.authorization.k8s.io/v1
  65. kind: ClusterRoleBinding
  66. metadata:
  67. name: {{ include "external-secrets.fullname" . }}-cert-controller
  68. labels:
  69. {{- include "external-secrets-cert-controller.labels" . | nindent 4 }}
  70. roleRef:
  71. apiGroup: rbac.authorization.k8s.io
  72. kind: ClusterRole
  73. name: {{ include "external-secrets.fullname" . }}-cert-controller
  74. subjects:
  75. - name: {{ include "external-secrets-cert-controller.serviceAccountName" . }}
  76. namespace: {{ .Release.Namespace | quote }}
  77. kind: ServiceAccount
  78. {{- end }}