mirror of
https://github.com/bitnami/charts.git
synced 2026-03-16 14:57:08 +08:00
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
{{- if .Values.rbac.create -}}
|
|
# Helm 3.1 supports a lookup template tag to create a secret if it does not exist
|
|
# but we can't yet restrict to helm 3.1, hence manually doing this with an initContainer.
|
|
# in the post upgrade job.
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: {{ template "kubeapps.apprepository-job-postupgrade.fullname" . }}
|
|
labels:
|
|
app: {{ template "kubeapps.apprepository.fullname" . }}
|
|
chart: {{ template "kubeapps.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- secrets
|
|
verbs:
|
|
- get
|
|
- create
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: {{ template "kubeapps.apprepository-job-postupgrade.fullname" . }}
|
|
labels:
|
|
app: {{ template "kubeapps.apprepository.fullname" . }}
|
|
chart: {{ template "kubeapps.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: {{ template "kubeapps.apprepository-job-postupgrade.fullname" . }}
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ template "kubeapps.apprepository-job-postupgrade.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
{{- end -}}
|