From 13d3bdd5da5e0318b2fdf447b2b8b0d15f3026b1 Mon Sep 17 00:00:00 2001 From: Daan Selen Date: Wed, 8 Apr 2026 10:03:41 +0000 Subject: [PATCH] feat: add ability to add custom arguments to the dind daemon (#121) Fix: https://gitea.com/gitea/helm-actions/issues/22 --------- Co-authored-by: DaanSelen Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/121 Co-authored-by: Daan Selen Co-committed-by: Daan Selen --- .gitignore | 1 + README.md | 1 + templates/statefulset.yaml | 4 ++++ values.yaml | 7 +++++++ 4 files changed, 13 insertions(+) diff --git a/.gitignore b/.gitignore index 10261af..81e5509 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ charts/ node_modules/ .DS_Store unittests/*/__snapshot__/ +*secret*.yaml diff --git a/README.md b/README.md index b38fdfb..e99e24a 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ If `.Values.statefulset.dind.rootless: true` is set, then the following will be | `statefulset.dind.pullPolicy` | The Docker-in-Docker pullPolicy | `IfNotPresent` | | `statefulset.dind.extraVolumeMounts` | Allows mounting extra volumes in the Docker-in-Docker container | `[]` | | `statefulset.dind.extraEnvs` | Allows adding custom environment variables, such as `DOCKER_IPTABLES_LEGACY` | `[]` | +| `statefulset.dind.extraArgs` | Allows adding custom arguments to the Docker Daemon | `[]` | ### Gitea Actions Init diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index fc45b04..f2900e8 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -71,6 +71,10 @@ spec: {{- end }} securityContext: privileged: true + {{- if .Values.statefulset.dind.extraArgs }} + args: + {{- toYaml .Values.statefulset.dind.extraArgs | nindent 12 }} + {{- end }} startupProbe: exec: command: diff --git a/values.yaml b/values.yaml index 180325f..d58f472 100644 --- a/values.yaml +++ b/values.yaml @@ -39,6 +39,7 @@ ## @param statefulset.dind.pullPolicy The Docker-in-Docker pullPolicy ## @param statefulset.dind.extraVolumeMounts Allows mounting extra volumes in the Docker-in-Docker container ## @param statefulset.dind.extraEnvs Allows adding custom environment variables, such as `DOCKER_IPTABLES_LEGACY` +## @param statefulset.dind.extraArgs Allows adding custom arguments to the Docker Daemon # enabled: false statefulset: @@ -109,6 +110,12 @@ statefulset: # - name: "DOCKER_IPTABLES_LEGACY" # value: "1" + # Option to add extra arguments/commands to the container/pod: + # [#22](https://gitea.com/gitea/helm-actions/issues/22) [k8s docs](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/) + extraArgs: + [] + # - --mtu=1400 + ## @section Gitea Actions Init # ## @param init.image.registry image registry, e.g. gcr.io,docker.io