Files
capsule/charts/capsule/templates/post-install/rbac.yaml
Oliver Bähler 5ca926c255 chore(repo): pre-commit fixes (#1431)
* chore: add golint to pre-commit

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: move legacy docs

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: ran pre-commit

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: fix goreleaser regexps

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

---------

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
2025-05-01 11:46:25 +02:00

45 lines
1.3 KiB
YAML

{{- if .Values.tls.create }}
{{- if not $.Values.crds.exclusive }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "capsule.post-install.name" . }}
namespace: {{ .Release.Namespace | quote }}
annotations:
# create hook dependencies in the right order
"helm.sh/hook-weight": "-3"
{{- include "capsule.post-install.annotations" . | nindent 4 }}
labels:
app.kubernetes.io/component: {{ include "capsule.post-install.component" . | quote }}
{{- include "capsule.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "capsule.post-install.name" . }}
namespace: {{ .Release.Namespace | quote }}
annotations:
# create hook dependencies in the right order
"helm.sh/hook-weight": "-2"
{{- include "capsule.post-install.annotations" . | nindent 4 }}
labels:
app.kubernetes.io/component: {{ include "capsule.post-install.component" . | quote }}
{{- include "capsule.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "capsule.post-install.name" . }}
subjects:
- kind: ServiceAccount
name: {{ include "capsule.post-install.name" . }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
{{- end }}