mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 19:50:30 +00:00
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com> Co-authored-by: Nikola Jokic <jokicnikola07@gmail.com>
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
{{- $containerMode := .Values.containerMode }}
|
|
{{- $hasCustomResourceMeta := (and .Values.resourceMeta .Values.resourceMeta.kubernetesModeServiceAccount) }}
|
|
{{- if and (eq $containerMode.type "kubernetes") (not .Values.template.spec.serviceAccountName) }}
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: {{ include "gha-runner-scale-set.kubeModeServiceAccountName" . }}
|
|
namespace: {{ include "gha-runner-scale-set.namespace" . }}
|
|
{{- if or .Values.annotations $hasCustomResourceMeta }}
|
|
annotations:
|
|
{{- with .Values.annotations }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- if $hasCustomResourceMeta }}
|
|
{{- with .Values.resourceMeta.kubernetesModeServiceAccount.annotations }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
{{- with .Values.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- if $hasCustomResourceMeta }}
|
|
{{- with .Values.resourceMeta.kubernetesModeServiceAccount.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- include "gha-runner-scale-set.labels" . | nindent 4 }}
|
|
|
|
finalizers:
|
|
- actions.github.com/cleanup-protection
|
|
{{- end }}
|