workflow-test/charts/azure-agent/templates/rolebindings.yaml
Jonas Forsberg 56a38f556a
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 17s
moved
2024-10-15 13:50:57 +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 }}