2023-02-13 16:48:20 +00:00
|
|
|
{{/*
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
|
|
|
SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/}}
|
|
|
|
|
2024-05-28 11:52:10 +00:00
|
|
|
{{- template "openbao.injectorEnabled" . -}}
|
2022-03-21 16:50:23 +00:00
|
|
|
{{- if .injectorEnabled -}}
|
|
|
|
{{- if eq (.Values.global.psp.enable | toString) "true" }}
|
2020-06-26 06:42:52 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: Role
|
|
|
|
metadata:
|
2024-05-28 11:52:10 +00:00
|
|
|
name: {{ template "openbao.fullname" . }}-agent-injector-psp
|
|
|
|
namespace: {{ include "openbao.namespace" . }}
|
2020-06-26 06:42:52 +00:00
|
|
|
labels:
|
2024-05-28 11:52:10 +00:00
|
|
|
app.kubernetes.io/name: {{ include "openbao.name" . }}
|
2020-06-26 06:42:52 +00:00
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
|
|
rules:
|
|
|
|
- apiGroups: ['policy']
|
|
|
|
resources: ['podsecuritypolicies']
|
|
|
|
verbs: ['use']
|
|
|
|
resourceNames:
|
2024-05-28 11:52:10 +00:00
|
|
|
- {{ template "openbao.fullname" . }}-agent-injector
|
2020-06-26 06:42:52 +00:00
|
|
|
{{- end }}
|
2022-03-21 16:50:23 +00:00
|
|
|
{{- end }}
|