Files
shell-scripts/部署应用/Oracle-Cloud/cert-manager/cert-manager-1.6.1/templates/startupapicheck-psp-clusterrolebinding.yaml
2023-05-15 16:49:09 +08:00

27 lines
931 B
YAML

{{- if .Values.startupapicheck.enabled -}}
{{- if .Values.global.podSecurityPolicy.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "startupapicheck.fullname" . }}-psp
labels:
app: {{ include "startupapicheck.name" . }}
app.kubernetes.io/name: {{ include "startupapicheck.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "startupapicheck"
{{- include "labels" . | nindent 4 }}
{{- if .Values.startupapicheck.rbac.annotations }}
annotations:
{{ toYaml .Values.startupapicheck.rbac.annotations | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "startupapicheck.fullname" . }}-psp
subjects:
- kind: ServiceAccount
name: {{ template "startupapicheck.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end }}