diff --git a/README.md b/README.md index f423607..0c0c0f6 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,8 @@ You should be good to go! | `statefulset.actRunner.fullOverride` | Completely overrides the image registry, path/image, tag and digest. | `""` | | `statefulset.actRunner.extraVolumeMounts` | Allows mounting extra volumes in the act runner container | `[]` | | `statefulset.actRunner.config` | Act runner custom configuration. See [Act Runner documentation](https://docs.gitea.com/usage/actions/act-runner#configuration) for details. | `Too complex. See values.yaml` | +| `statefulset.dind.rootless` | a simple flag to let helm know we are dealing with a rootless dind container | `false` | +| `statefulset.dind.uid` | a field to set the running user id for the rootless dind container, so it knows where to look for the socket | `""` | | `statefulset.dind.registry` | image registry, e.g. gcr.io,docker.io | `docker.io` | | `statefulset.actRunner.extraEnvs` | Allows adding custom environment variables | `[]` | | `statefulset.dind.repository` | The Docker-in-Docker image | `docker` | diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index c965810..2508499 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -60,13 +60,21 @@ spec: command: - /usr/bin/test - -S + {{- if .Values.statefulset.dind.rootless }} + - /run/user/{{ .Values.statefulset.dind.uid | default 1000 }}/docker.sock + {{- else }} - /var/run/docker.sock + {{- end }} livenessProbe: exec: command: - /usr/bin/test - -S + {{- if .Values.statefulset.dind.rootless }} + - /run/user/{{ .Values.statefulset.dind.uid | default 1000 }}/docker.sock + {{- else }} - /var/run/docker.sock + {{- end }} resources: {{- toYaml .Values.statefulset.resources | nindent 12 }} volumeMounts: diff --git a/values.yaml b/values.yaml index 62ef168..1ba3cf6 100644 --- a/values.yaml +++ b/values.yaml @@ -21,6 +21,8 @@ ## @param statefulset.actRunner.fullOverride Completely overrides the image registry, path/image, tag and digest. ## @param statefulset.actRunner.extraVolumeMounts Allows mounting extra volumes in the act runner container ## @param statefulset.actRunner.config [default: Too complex. See values.yaml] Act runner custom configuration. See [Act Runner documentation](https://docs.gitea.com/usage/actions/act-runner#configuration) for details. +## @param statefulset.dind.rootless [default: false] a simple flag to let helm know we are dealing with a rootless dind container +## @param statefulset.dind.uid a field to set the running user id for the rootless dind container, so it knows where to look for the socket ## @param statefulset.dind.registry image registry, e.g. gcr.io,docker.io ## @param statefulset.actRunner.extraEnvs Allows adding custom environment variables ## @param statefulset.dind.repository The Docker-in-Docker image @@ -74,6 +76,8 @@ statefulset: docker_timeout: 300s dind: + rootless: false + uid: "" registry: "docker.io" repository: docker tag: 28.3.3-dind