mirror of
https://gitea.com/gitea/helm-actions.git
synced 2025-10-22 07:28:17 +00:00
Compare commits
3 Commits
update-run
...
add-dind-d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5b94297a9c | ||
![]() |
072b97470e | ||
![]() |
53393816ed |
@@ -6,6 +6,10 @@ The parameters which can be used to customize the deployment are described below
|
|||||||
|
|
||||||
If you want to propose a new feature or mechanism, submit an [issue here](https://gitea.com/gitea/helm-actions/issues).
|
If you want to propose a new feature or mechanism, submit an [issue here](https://gitea.com/gitea/helm-actions/issues).
|
||||||
|
|
||||||
|
## Docs
|
||||||
|
|
||||||
|
[Docs](./docs/README.md)
|
||||||
|
|
||||||
## Rootless Defaults
|
## Rootless Defaults
|
||||||
|
|
||||||
If `.Values.image.rootless: true`, then the following will occur. In case you use `.Values.image.fullOverride`, check that this works in your image:
|
If `.Values.image.rootless: true`, then the following will occur. In case you use `.Values.image.fullOverride`, check that this works in your image:
|
||||||
|
3
docs/README.md
Normal file
3
docs/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Gitea Actions Helm Chart Docs
|
||||||
|
|
||||||
|
- [Share dind with job container](share-dind-with-job-container.md)
|
36
docs/share-dind-with-job-container.md
Normal file
36
docs/share-dind-with-job-container.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# Share dind with job container
|
||||||
|
|
||||||
|
You can weaken isolation and allow jobs to call docker commands.
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
- Docker bind mounts like `-v /path/on/self/container:/path/to/new/container` do not work, because they are going to mount the path from the dind container
|
||||||
|
- Docker port expose to local host `-e 80:8080` is not going to work
|
||||||
|
|
||||||
|
## Example Values
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
enabled: true
|
||||||
|
statefulset:
|
||||||
|
actRunner:
|
||||||
|
# See full example here: https://gitea.com/gitea/act_runner/src/branch/main/internal/pkg/config/config.example.yaml
|
||||||
|
config: |
|
||||||
|
log:
|
||||||
|
level: debug
|
||||||
|
cache:
|
||||||
|
enabled: false
|
||||||
|
container:
|
||||||
|
valid_volumes:
|
||||||
|
- /var/run/docker.sock
|
||||||
|
options: -v /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
|
||||||
|
## Specify an existing token secret
|
||||||
|
##
|
||||||
|
existingSecret: "runner-token2"
|
||||||
|
existingSecretKey: "token"
|
||||||
|
|
||||||
|
## Specify the root URL of the Gitea instance
|
||||||
|
giteaRootURL: "http://192.168.1.2:3000"
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can run docker commands inside your jobs.
|
@@ -48,6 +48,20 @@ spec:
|
|||||||
image: "{{ .Values.statefulset.actRunner.repository }}:{{ .Values.statefulset.actRunner.tag }}"
|
image: "{{ .Values.statefulset.actRunner.repository }}:{{ .Values.statefulset.actRunner.tag }}"
|
||||||
imagePullPolicy: {{ .Values.statefulset.actRunner.pullPolicy }}
|
imagePullPolicy: {{ .Values.statefulset.actRunner.pullPolicy }}
|
||||||
workingDir: /data
|
workingDir: /data
|
||||||
|
command:
|
||||||
|
# The following is a workaround for: https://gitea.com/gitea/act_runner/issues/731
|
||||||
|
# We must add the docker-cli package for the server AND client cert verification.
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
apk add --no-cache docker-cli
|
||||||
|
echo "Waiting for Docker daemon..."
|
||||||
|
until timeout 10 docker info > /dev/null; do
|
||||||
|
echo "Failed, retrying..."
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
echo "Docker is ready, starting act-runner..."
|
||||||
|
exec run.sh
|
||||||
env:
|
env:
|
||||||
- name: DOCKER_HOST
|
- name: DOCKER_HOST
|
||||||
value: tcp://127.0.0.1:2376
|
value: tcp://127.0.0.1:2376
|
||||||
|
Reference in New Issue
Block a user