mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 12:06:57 +00:00
34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
{{- $containerMode := .Values.containerMode }}
|
|
{{- $hasCustomResourceMeta := (and .Values.resourceMeta .Values.resourceMeta.kubernetesModeServiceAccount) }}
|
|
{{- if and (or (eq $containerMode.type "kubernetes") (eq $containerMode.type "kubernetes-novolume")) (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 }}
|