Mohammed Naser | fe349c7 | 2023-07-10 15:45:41 -0400 | [diff] [blame] | 1 | {{/* |
| 2 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | you may not use this file except in compliance with the License. |
| 4 | You may obtain a copy of the License at |
| 5 | |
okozachenko1203 | d2cd687 | 2023-08-31 19:53:51 +1000 | [diff] [blame] | 6 | http://www.apache.org/licenses/LICENSE-2.0 |
Mohammed Naser | fe349c7 | 2023-07-10 15:45:41 -0400 | [diff] [blame] | 7 | |
| 8 | Unless required by applicable law or agreed to in writing, software |
| 9 | distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | See the License for the specific language governing permissions and |
| 12 | limitations under the License. |
| 13 | */}} |
| 14 | |
okozachenko1203 | d2cd687 | 2023-08-31 19:53:51 +1000 | [diff] [blame] | 15 | {{- if .Values.manifests.role_cert_manager }} |
| 16 | {{- $serviceAccountName := "libvirt" }} |
Mohammed Naser | fe349c7 | 2023-07-10 15:45:41 -0400 | [diff] [blame] | 17 | --- |
| 18 | apiVersion: rbac.authorization.k8s.io/v1 |
| 19 | kind: RoleBinding |
| 20 | metadata: |
| 21 | name: {{ .Release.Name }}-cert-manager |
| 22 | namespace: {{ .Release.Namespace }} |
| 23 | roleRef: |
| 24 | apiGroup: rbac.authorization.k8s.io |
| 25 | kind: Role |
| 26 | name: {{ .Release.Name }}-cert-manager |
| 27 | subjects: |
| 28 | - kind: ServiceAccount |
okozachenko1203 | d2cd687 | 2023-08-31 19:53:51 +1000 | [diff] [blame] | 29 | name: {{ $serviceAccountName }} |
Mohammed Naser | fe349c7 | 2023-07-10 15:45:41 -0400 | [diff] [blame] | 30 | namespace: {{ .Release.Namespace }} |
| 31 | --- |
| 32 | apiVersion: rbac.authorization.k8s.io/v1 |
| 33 | kind: Role |
| 34 | metadata: |
| 35 | name: {{ .Release.Name }}-cert-manager |
| 36 | namespace: {{ .Release.Namespace }} |
| 37 | rules: |
| 38 | - apiGroups: |
| 39 | - cert-manager.io |
| 40 | verbs: |
| 41 | - get |
Mohammed Naser | e720d78 | 2023-07-10 15:57:21 -0400 | [diff] [blame] | 42 | - list |
| 43 | - create |
Rico Lin | c6ac7a1 | 2023-11-03 00:25:40 +0800 | [diff] [blame] | 44 | - watch |
Mohammed Naser | fe349c7 | 2023-07-10 15:45:41 -0400 | [diff] [blame] | 45 | resources: |
| 46 | - certificates |
Mohammed Naser | 6dd0592 | 2023-07-10 16:31:40 -0400 | [diff] [blame] | 47 | - apiGroups: |
| 48 | - "" |
| 49 | verbs: |
| 50 | - get |
Mohammed Naser | 168acc3 | 2024-01-09 17:15:26 -0500 | [diff] [blame] | 51 | - list |
Mohammed Naser | c1936ed | 2023-07-10 16:35:25 -0400 | [diff] [blame] | 52 | - patch |
Mohammed Naser | 168acc3 | 2024-01-09 17:15:26 -0500 | [diff] [blame] | 53 | - watch |
Mohammed Naser | 6dd0592 | 2023-07-10 16:31:40 -0400 | [diff] [blame] | 54 | resources: |
| 55 | - secrets |
Mohammed Naser | 168acc3 | 2024-01-09 17:15:26 -0500 | [diff] [blame] | 56 | {{- end -}} |