workflow-test/charts/azure-agent/templates/rolebindings.yaml
Jonas Forsberg 13e65a8b5b
Some checks failed
Testing pipes / Explore-Gitea-Actions (push) Successful in 42s
Lint and Test Charts / lint-test (push) Failing after 55s
.
2024-10-15 10:11:11 +02:00

20 lines
560 B
YAML

{{- $sa_namespace := .Release.Namespace -}}
{{- $object_name := include "az-agent.serviceAccountName" . -}}
{{- $labels := include "az-agent.labels" . | nindent 4 -}}
{{- range .Values.build.namespaces }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ $object_name }}
namespace: {{ . }}
labels: {{ $labels }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: {{ $object_name }}
namespace: {{ $sa_namespace }}
{{ end }}