blob: c7f7b3cda9fc983e792019d86b5d00c60e039625 [file] [log] [blame]
Mohammed Naserfe349c72023-07-10 15:45:41 -04001{{/*
2Licensed under the Apache License, Version 2.0 (the "License");
3you may not use this file except in compliance with the License.
4You may obtain a copy of the License at
5
okozachenko1203d2cd6872023-08-31 19:53:51 +10006 http://www.apache.org/licenses/LICENSE-2.0
Mohammed Naserfe349c72023-07-10 15:45:41 -04007
8Unless required by applicable law or agreed to in writing, software
9distributed under the License is distributed on an "AS IS" BASIS,
10WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11See the License for the specific language governing permissions and
12limitations under the License.
13*/}}
14
okozachenko1203d2cd6872023-08-31 19:53:51 +100015{{- if .Values.manifests.role_cert_manager }}
16{{- $serviceAccountName := "libvirt" }}
Mohammed Naserfe349c72023-07-10 15:45:41 -040017---
18apiVersion: rbac.authorization.k8s.io/v1
19kind: RoleBinding
20metadata:
21 name: {{ .Release.Name }}-cert-manager
22 namespace: {{ .Release.Namespace }}
23roleRef:
24 apiGroup: rbac.authorization.k8s.io
25 kind: Role
26 name: {{ .Release.Name }}-cert-manager
27subjects:
28 - kind: ServiceAccount
okozachenko1203d2cd6872023-08-31 19:53:51 +100029 name: {{ $serviceAccountName }}
Mohammed Naserfe349c72023-07-10 15:45:41 -040030 namespace: {{ .Release.Namespace }}
31---
32apiVersion: rbac.authorization.k8s.io/v1
33kind: Role
34metadata:
35 name: {{ .Release.Name }}-cert-manager
36 namespace: {{ .Release.Namespace }}
37rules:
38 - apiGroups:
39 - cert-manager.io
40 verbs:
41 - get
Mohammed Nasere720d782023-07-10 15:57:21 -040042 - list
43 - create
Rico Linc6ac7a12023-11-03 00:25:40 +080044 - watch
Mohammed Naserfe349c72023-07-10 15:45:41 -040045 resources:
46 - certificates
Mohammed Naser6dd05922023-07-10 16:31:40 -040047 - apiGroups:
48 - ""
49 verbs:
50 - get
Mohammed Naser168acc32024-01-09 17:15:26 -050051 - list
Mohammed Naserc1936ed2023-07-10 16:35:25 -040052 - patch
Mohammed Naser168acc32024-01-09 17:15:26 -050053 - watch
Mohammed Naser6dd05922023-07-10 16:31:40 -040054 resources:
55 - secrets
Mohammed Naser168acc32024-01-09 17:15:26 -050056{{- end -}}