refactor: unittests and slightly add QoL (#127)
Reorder the unittests --------- Co-authored-by: DaanSelen <dselen@systemec.nl> Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/127
This commit is contained in:
+10
-10
@@ -14,14 +14,14 @@ If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "gitea.actions.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -36,7 +36,7 @@ Create a default worker name.
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "gitea.actions.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -45,7 +45,7 @@ Storage Class
|
||||
{{- define "gitea.actions.persistence.storageClass" -}}
|
||||
{{- $storageClass := default (tpl ( default "" .Values.global.storageClass) .) }}
|
||||
{{- if $storageClass }}
|
||||
storageClassName: {{ $storageClass | quote }}
|
||||
storageClassName: {{ $storageClass | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -128,4 +128,4 @@ Create image for Init
|
||||
*/}}
|
||||
{{- define "gitea.actions.init.image" -}}
|
||||
{{ include "gitea.actions.common.image" (dict "root" . "image" .Values.init.image) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -11,9 +11,9 @@ data:
|
||||
config.yaml: |
|
||||
{{- with .Values.statefulset.actRunner.config -}}
|
||||
{{- if kindIs "string" . -}}
|
||||
{{ . | nindent 4}}
|
||||
{{ . | nindent 4}}
|
||||
{{- else -}}
|
||||
{{ toYaml . | nindent 4}}
|
||||
{{ toYaml . | nindent 4}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
@@ -32,14 +32,14 @@ spec:
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
{{- if .Values.statefulset.serviceAccountName }}
|
||||
serviceAccountName: {{ .Values.statefulset.serviceAccountName }}
|
||||
serviceAccountName: {{ .Values.statefulset.serviceAccountName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.statefulset.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.statefulset.securityContext | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.statefulset.runtimeClassName }}
|
||||
runtimeClassName: {{ .Values.statefulset.runtimeClassName }}
|
||||
runtimeClassName: {{ .Values.statefulset.runtimeClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.statefulset.hostAliases }}
|
||||
hostAliases:
|
||||
|
||||
Reference in New Issue
Block a user