mirror of
https://gitea.com/gitea/helm-actions.git
synced 2026-07-17 03:34:45 +00:00
Compare commits
1 Commits
v0.0.5
...
68c0b3f903
| Author | SHA1 | Date | |
|---|---|---|---|
| 68c0b3f903 |
@ -32,14 +32,14 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
{{- if .Values.statefulset.serviceAccountName }}
|
{{- if .Values.statefulset.serviceAccountName }}
|
||||||
serviceAccountName: {{ .Values.statefulset.serviceAccountName }}
|
serviceAccountName: {{ .Values.statefulset.serviceAccountName | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.statefulset.securityContext }}
|
{{- if .Values.statefulset.securityContext }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.statefulset.securityContext | nindent 8 }}
|
{{- toYaml .Values.statefulset.securityContext | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.statefulset.runtimeClassName }}
|
{{- if .Values.statefulset.runtimeClassName }}
|
||||||
runtimeClassName: {{ .Values.statefulset.runtimeClassName }}
|
runtimeClassName: {{ .Values.statefulset.runtimeClassName | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.statefulset.hostAliases }}
|
{{- if .Values.statefulset.hostAliases }}
|
||||||
hostAliases:
|
hostAliases:
|
||||||
|
|||||||
@ -456,38 +456,6 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].env[0].valueFrom.secretKeyRef.key
|
path: spec.template.spec.containers[0].env[0].valueFrom.secretKeyRef.key
|
||||||
value: "secret-key"
|
value: "secret-key"
|
||||||
- it: should interpret Gitea Root URL templating
|
|
||||||
template: templates/statefulset.yaml
|
|
||||||
set:
|
|
||||||
global:
|
|
||||||
gitea:
|
|
||||||
service:
|
|
||||||
name: "my-gitea-svc-http"
|
|
||||||
port: 3210
|
|
||||||
enabled: true
|
|
||||||
giteaRootURL: "http://{{ .Values.global.gitea.service.name }}:{{ .Values.global.gitea.service.port }}"
|
|
||||||
asserts:
|
|
||||||
- hasDocuments:
|
|
||||||
count: 1
|
|
||||||
- containsDocument:
|
|
||||||
kind: StatefulSet
|
|
||||||
apiVersion: apps/v1
|
|
||||||
name: gitea-unittests-actions-act-runner
|
|
||||||
- equal:
|
|
||||||
path: spec.template.spec.containers[0].env[1].name
|
|
||||||
value: "GITEA_INSTANCE_URL"
|
|
||||||
- equal:
|
|
||||||
path: spec.template.spec.containers[0].env[1].value
|
|
||||||
value: "http://my-gitea-svc-http:3210"
|
|
||||||
- equal:
|
|
||||||
path: spec.template.spec.initContainers[0].command[2]
|
|
||||||
value: |
|
|
||||||
echo 'Trying to reach Gitea on http://my-gitea-svc-http:3210'
|
|
||||||
until timeout 10 wget --no-check-certificate --spider http://my-gitea-svc-http:3210; do
|
|
||||||
sleep 3
|
|
||||||
echo "Trying again in 3 seconds..."
|
|
||||||
done
|
|
||||||
echo "Gitea has been reached!"
|
|
||||||
- it: should render service account name correctly
|
- it: should render service account name correctly
|
||||||
template: templates/statefulset.yaml
|
template: templates/statefulset.yaml
|
||||||
set:
|
set:
|
||||||
@ -500,3 +468,15 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.serviceAccountName
|
path: spec.template.spec.serviceAccountName
|
||||||
value: "my-service-account"
|
value: "my-service-account"
|
||||||
|
- it: should render runtime class name correctly
|
||||||
|
template: templates/statefulset.yaml
|
||||||
|
set:
|
||||||
|
enabled: true
|
||||||
|
statefulset:
|
||||||
|
runtimeClassName: "my-runtime-class-name"
|
||||||
|
asserts:
|
||||||
|
- hasDocuments:
|
||||||
|
count: 1
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.runtimeClassName
|
||||||
|
value: "my-runtime-class-name"
|
||||||
|
|||||||
Reference in New Issue
Block a user