mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-08 16:45:30 +00:00
24 lines
792 B
YAML
24 lines
792 B
YAML
|
{{- if and (.Values.serviceAccount.create) (.Values.serviceAccount.rbac.create) -}}
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: RoleBinding
|
||
|
metadata:
|
||
|
name: {{ include "woodpecker-agent.serviceAccountName" . }}
|
||
|
labels:
|
||
|
{{- include "woodpecker-agent.labels" . | nindent 4 }}
|
||
|
{{- with .Values.serviceAccount.rbac.roleBinding.labels }}
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.serviceAccount.rbac.roleBinding.annotations }}
|
||
|
annotations:
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
subjects:
|
||
|
- kind: ServiceAccount
|
||
|
name: {{ include "woodpecker-agent.serviceAccountName" . }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
roleRef:
|
||
|
kind: Role
|
||
|
name: {{ include "woodpecker-agent.serviceAccountName" . }}
|
||
|
apiGroup: rbac.authorization.k8s.io
|
||
|
{{- end }}
|