chore: add imagePullSecrets and slightly refac the statefulset

This commit is contained in:
DaanSelen
2026-03-18 10:24:25 +01:00
parent 3f2fdd9c42
commit aee0e7c216
4 changed files with 34 additions and 23 deletions

View File

@ -94,6 +94,7 @@ You should be good to go!
### Global ### Global
| Name | Description | Value | | Name | Description | Value |
| ---------------------- | ------------------------------ | ----- | | ------------------------- | ------------------------------ | ----- |
| `global.imageRegistry` | global image registry override | `""` | | `global.imageRegistry` | global image registry override | `""` |
| `global.imagePullSecrets` | global image pull secrets | `""` |
| `global.storageClass` | global storage class override | `""` | | `global.storageClass` | global storage class override | `""` |

View File

@ -52,7 +52,6 @@ spec:
env: env:
{{- toYaml .Values.statefulset.dind.extraEnvs | nindent 12 }} {{- toYaml .Values.statefulset.dind.extraEnvs | nindent 12 }}
{{- end }} {{- end }}
restartPolicy: Always
securityContext: securityContext:
privileged: true privileged: true
startupProbe: startupProbe:
@ -75,6 +74,7 @@ spec:
{{- with .Values.statefulset.dind.extraVolumeMounts }} {{- with .Values.statefulset.dind.extraVolumeMounts }}
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }} {{- end }}
restartPolicy: Always
containers: containers:
- name: act-runner - name: act-runner
image: "{{ include "gitea.actions.actRunner.image" . }}" image: "{{ include "gitea.actions.actRunner.image" . }}"
@ -109,6 +109,12 @@ spec:
{{- with .Values.statefulset.actRunner.extraVolumeMounts }} {{- with .Values.statefulset.actRunner.extraVolumeMounts }}
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }} {{- end }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- range $key, $value := .Values.statefulset.nodeSelector }} {{- range $key, $value := .Values.statefulset.nodeSelector }}
nodeSelector: nodeSelector:
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
@ -135,7 +141,9 @@ spec:
name: data-act-runner name: data-act-runner
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
{{- include "gitea.actions.persistence.storageClass" . | nindent 8 }} {{- if .Values.global.storageClass }}
{{- include "gitea.actions.persistence.storageClass" . | indent 8 }}
{{- end }}
resources: resources:
requests: requests:
storage: {{ .Values.statefulset.persistence.size }} storage: {{ .Values.statefulset.persistence.size }}

View File

@ -48,7 +48,7 @@ tests:
enabled: true enabled: true
statefulset: statefulset:
actRunner: actRunner:
config: config: |
container: container:
valid_volumes: valid_volumes:
- /var/run/docker.sock - /var/run/docker.sock

View File

@ -48,6 +48,22 @@ statefulset:
extraVolumes: [] extraVolumes: []
securityContext: {} securityContext: {}
dind:
registry: ""
repository: docker
tag: 28.3.3-dind
digest: ""
pullPolicy: IfNotPresent
fullOverride: ""
extraVolumeMounts: []
# If the container keeps crashing in your environment, you might have to add the `DOCKER_IPTABLES_LEGACY` environment variable.
# See https://github.com/docker-library/docker/issues/463#issuecomment-1881909456
extraEnvs:
[]
# - name: "DOCKER_IPTABLES_LEGACY"
# value: "1"
actRunner: actRunner:
registry: "docker.gitea.com" registry: "docker.gitea.com"
repository: act_runner repository: act_runner
@ -73,22 +89,6 @@ statefulset:
require_docker: true require_docker: true
docker_timeout: 300s docker_timeout: 300s
dind:
registry: ""
repository: docker
tag: 28.3.3-dind
digest: ""
pullPolicy: IfNotPresent
fullOverride: ""
extraVolumeMounts: []
# If the container keeps crashing in your environment, you might have to add the `DOCKER_IPTABLES_LEGACY` environment variable.
# See https://github.com/docker-library/docker/issues/463#issuecomment-1881909456
extraEnvs:
[]
# - name: "DOCKER_IPTABLES_LEGACY"
# value: "1"
persistence: persistence:
size: 1Gi size: 1Gi
@ -121,7 +121,9 @@ giteaRootURL: ""
## @section Global ## @section Global
# #
## @param global.imageRegistry global image registry override ## @param global.imageRegistry global image registry override
## @param global.imagePullSecrets global image registry pull secrets
## @param global.storageClass global storage class override ## @param global.storageClass global storage class override
global: global:
imageRegistry: "" imageRegistry: ""
imagePullSecrets: []
storageClass: "" storageClass: ""