k8s-deployment/charts/roles/templates/rolebindings.yaml

28 lines
633 B
YAML
Raw Normal View History

2024-10-10 05:25:16 +00:00
{{- if .Values.bindings }}
{{- range $bindings := .Values.bindings }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: {{ $bindings.kind }}
metadata:
name: {{ $bindings.name }}
namespace: {{ $bindings.namespace }}
labels:
{{- include "roles.labels" $ | nindent 4 }}
{{- with $bindings.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $bindings.annotations}}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
{{- with $bindings.subjects }}
{{- toYaml . | nindent 4 }}
{{- end }}
roleRef:
{{- with $bindings.roleRef }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}