k8s-deployment/charts/roles/templates/roles.yaml
2024-10-10 07:25:16 +02:00

24 lines
522 B
YAML

{{- if .Values.roles }}
{{- range $roles := .Values.roles }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: {{ $roles.kind }}
metadata:
name: {{ $roles.name }}
namespace: {{ $roles.namespace }}
labels:
{{- include "roles.labels" $ | nindent 4 }}
{{- with $roles.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $roles.annotations}}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- with $roles.rules }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}