2025-03-07 11:57:48 +01:00
|
|
|
{{- $hasCustomResourceMeta := (and .Values.resourceMeta .Values.resourceMeta.noPermissionServiceAccount) }}
|
2023-03-28 10:16:38 +01:00
|
|
|
{{- $containerMode := .Values.containerMode }}
|
|
|
|
|
{{- if and (ne $containerMode.type "kubernetes") (not .Values.template.spec.serviceAccountName) }}
|
2023-01-17 14:36:04 -05:00
|
|
|
apiVersion: v1
|
|
|
|
|
kind: ServiceAccount
|
|
|
|
|
metadata:
|
2023-03-01 13:16:03 +01:00
|
|
|
name: {{ include "gha-runner-scale-set.noPermissionServiceAccountName" . }}
|
2025-03-18 20:41:04 +00:00
|
|
|
namespace: {{ include "gha-runner-scale-set.namespace" . }}
|
2023-01-17 14:36:04 -05:00
|
|
|
labels:
|
2025-10-14 13:24:25 +02:00
|
|
|
{{- $base := include "gha-runner-scale-set.labels" . | fromYaml }}
|
|
|
|
|
{{- $extra := dict "app.kubernetes.io/component" "" }}
|
|
|
|
|
{{- $reserved := merge $base $extra }}
|
2025-03-07 11:57:48 +01:00
|
|
|
{{- with .Values.labels }}
|
2025-10-14 13:24:25 +02:00
|
|
|
{{- range $k, $v := . }}
|
|
|
|
|
{{- if not (or (hasKey $reserved $k) (hasPrefix "actions.github.com/" $k)) }}
|
|
|
|
|
{{ $k }}: {{ $v | quote }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end }}
|
2025-03-07 11:57:48 +01:00
|
|
|
{{- end }}
|
|
|
|
|
{{- if $hasCustomResourceMeta }}
|
|
|
|
|
{{- with .Values.resourceMeta.noPermissionServiceAccount.labels }}
|
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end }}
|
2023-03-01 13:16:03 +01:00
|
|
|
{{- include "gha-runner-scale-set.labels" . | nindent 4 }}
|
2025-03-07 11:57:48 +01:00
|
|
|
annotations:
|
|
|
|
|
{{- with .Values.annotations }}
|
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if $hasCustomResourceMeta }}
|
|
|
|
|
{{- with .Values.resourceMeta.noPermissionServiceAccount.annotations }}
|
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end }}
|
2023-04-03 21:06:12 +02:00
|
|
|
finalizers:
|
|
|
|
|
- actions.github.com/cleanup-protection
|
2023-03-28 10:16:38 +01:00
|
|
|
{{- end }}
|