mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 11:41:27 +00:00
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com> Co-authored-by: Nikola Jokic <jokicnikola07@gmail.com>
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
{{- $hasCustomResourceMeta := (and .Values.resourceMeta .Values.resourceMeta.managerRoleBinding) }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: {{ include "gha-runner-scale-set.managerRoleBindingName" . }}
|
|
namespace: {{ include "gha-runner-scale-set.namespace" . }}
|
|
labels:
|
|
{{- with .Values.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- if $hasCustomResourceMeta }}
|
|
{{- with .Values.resourceMeta.managerRoleBinding.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- include "gha-runner-scale-set.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: manager-role-binding
|
|
annotations:
|
|
{{- with .Values.annotations }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- if $hasCustomResourceMeta }}
|
|
{{- with .Values.resourceMeta.managerRoleBinding.annotations }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
finalizers:
|
|
- actions.github.com/cleanup-protection
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: {{ include "gha-runner-scale-set.managerRoleName" . }}
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "gha-runner-scale-set.managerServiceAccountName" . | nindent 4 }}
|
|
namespace: {{ include "gha-runner-scale-set.managerServiceAccountNamespace" . | nindent 4 }}
|