Chart naming validation on AutoscalingRunnerSet install (#2347)

Co-authored-by: Bassem Dghaidi <568794+Link-@users.noreply.github.com>
Co-authored-by: Bassem Dghaidi <Link-@github.com>
This commit is contained in:
Nikola Jokic
2023-03-02 10:35:55 +01:00
committed by GitHub
parent e8d8c6f357
commit be47190d4c
3 changed files with 73 additions and 11 deletions

View File

@@ -1,6 +1,12 @@
apiVersion: actions.github.com/v1alpha1
kind: AutoscalingRunnerSet
metadata:
{{- if or (not .Release.Name) (gt (len .Release.Name) 45) }}
{{ fail "Name must have up to 45 characters" }}
{{- end }}
{{- if gt (len .Release.Namespace) 63 }}
{{ fail "Namespace must have up to 63 characters" }}
{{- end }}
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
labels:
@@ -82,7 +88,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
containers:
containers:
{{- if eq .Values.containerMode.type "dind" }}
- name: runner
{{- include "gha-runner-scale-set.dind-runner-container" . | nindent 8 }}
@@ -97,7 +103,7 @@ spec:
{{ .Values.template.spec.containers | toYaml | nindent 6 }}
{{- end }}
{{- if or .Values.template.spec.volumes (eq .Values.containerMode.type "dind") (eq .Values.containerMode.type "kubernetes") }}
volumes:
volumes:
{{- if eq .Values.containerMode.type "dind" }}
{{- include "gha-runner-scale-set.dind-volume" . | nindent 6 }}
{{- include "gha-runner-scale-set.dind-work-volume" . | nindent 6 }}
@@ -105,4 +111,4 @@ spec:
{{- include "gha-runner-scale-set.kubernetes-mode-work-volume" . | nindent 6 }}
{{- end }}
{{- include "gha-runner-scale-set.non-work-volumes" . | nindent 6 }}
{{- end }}
{{- end }}