Skip to content

Commit 5bafa95

Browse files
committed
cert-manager: add roles and rolebindings added in v1.5.4
Commands: ``` git fetch --tags git diff v1.5.3 v1.5.4 -- deploy/charts/cert-manager/templates git diff v1.5.3 v1.5.4 -- deploy/charts/cert-manager/templates cd deploy/charts/cert-manager/templates cp startupapicheck-psp-clusterrolebinding.yaml startupapicheck-psp-clusterrole.yaml \ ~/code/jetstack/jetstack-secure-gcm/chart/jetstack-secure-gcm/charts/cert-manager/templates ``` Signed-off-by: Maël Valais <mael@vls.dev>
1 parent c207a93 commit 5bafa95

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{{- if .Values.startupapicheck.enabled -}}
2+
{{- if .Values.global.podSecurityPolicy.enabled }}
3+
kind: ClusterRole
4+
apiVersion: rbac.authorization.k8s.io/v1
5+
metadata:
6+
name: {{ template "startupapicheck.fullname" . }}-psp
7+
labels:
8+
app: {{ include "startupapicheck.name" . }}
9+
app.kubernetes.io/name: {{ include "startupapicheck.name" . }}
10+
app.kubernetes.io/instance: {{ .Release.Name }}
11+
app.kubernetes.io/component: "startupapicheck"
12+
{{- include "labels" . | nindent 4 }}
13+
{{- if .Values.startupapicheck.rbac.annotations }}
14+
annotations:
15+
{{ toYaml .Values.startupapicheck.rbac.annotations | nindent 4 }}
16+
{{- end }}
17+
rules:
18+
- apiGroups: ['policy']
19+
resources: ['podsecuritypolicies']
20+
verbs: ['use']
21+
resourceNames:
22+
- {{ template "startupapicheck.fullname" . }}
23+
{{- end }}
24+
{{- end }}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{{- if .Values.startupapicheck.enabled -}}
2+
{{- if .Values.global.podSecurityPolicy.enabled }}
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: ClusterRoleBinding
5+
metadata:
6+
name: {{ template "startupapicheck.fullname" . }}-psp
7+
labels:
8+
app: {{ include "startupapicheck.name" . }}
9+
app.kubernetes.io/name: {{ include "startupapicheck.name" . }}
10+
app.kubernetes.io/instance: {{ .Release.Name }}
11+
app.kubernetes.io/component: "startupapicheck"
12+
{{- include "labels" . | nindent 4 }}
13+
{{- if .Values.startupapicheck.rbac.annotations }}
14+
annotations:
15+
{{ toYaml .Values.startupapicheck.rbac.annotations | nindent 4 }}
16+
{{- end }}
17+
roleRef:
18+
apiGroup: rbac.authorization.k8s.io
19+
kind: ClusterRole
20+
name: {{ template "startupapicheck.fullname" . }}-psp
21+
subjects:
22+
- kind: ServiceAccount
23+
name: {{ template "startupapicheck.serviceAccountName" . }}
24+
namespace: {{ .Release.Namespace }}
25+
{{- end }}
26+
{{- end }}

0 commit comments

Comments
 (0)