cert-controller-rbac.yaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. - "list"
  25. - "watch"
  26. - "get"
  27. - apiGroups:
  28. - "admissionregistration.k8s.io"
  29. resources:
  30. - "validatingwebhookconfigurations"
  31. resourceNames:
  32. - "secretstore-validate"
  33. - "externalsecret-validate"
  34. verbs:
  35. - "update"
  36. - "patch"
  37. - apiGroups:
  38. - ""
  39. resources:
  40. - "endpoints"
  41. verbs:
  42. - "list"
  43. - "get"
  44. - "watch"
  45. - apiGroups:
  46. - ""
  47. resources:
  48. - "events"
  49. verbs:
  50. - "create"
  51. - "patch"
  52. - apiGroups:
  53. - ""
  54. resources:
  55. - "secrets"
  56. verbs:
  57. - "get"
  58. - "list"
  59. - "watch"
  60. - "update"
  61. - "patch"
  62. - apiGroups:
  63. - "coordination.k8s.io"
  64. resources:
  65. - "leases"
  66. verbs:
  67. - "get"
  68. - "create"
  69. - "update"
  70. - "patch"
  71. ---
  72. apiVersion: rbac.authorization.k8s.io/v1
  73. kind: ClusterRoleBinding
  74. metadata:
  75. name: {{ include "external-secrets.fullname" . }}-cert-controller
  76. labels:
  77. {{- include "external-secrets-cert-controller.labels" . | nindent 4 }}
  78. roleRef:
  79. apiGroup: rbac.authorization.k8s.io
  80. kind: ClusterRole
  81. name: {{ include "external-secrets.fullname" . }}-cert-controller
  82. subjects:
  83. - name: {{ include "external-secrets-cert-controller.serviceAccountName" . }}
  84. namespace: {{ template "external-secrets.namespace" . }}
  85. kind: ServiceAccount
  86. {{- end }}