diff --git a/README.md b/README.md index 66952b3..e8f2925 100644 --- a/README.md +++ b/README.md @@ -6,18 +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). -## Docs - -[Docs](./docs/README.md) - -## 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.provisioning.enabled: true`, then uses the rootless Gitea image, must match helm-Gitea. - ## Quick-start +[Documentation](./docs/README.md) + To get started, add the Helm repo, assuming you have not already: ```sh @@ -39,6 +31,26 @@ helm upgrade --install gitea-actions gitea-charts/actions -f values.yaml You should be good to go! +### Runner Token Secret Template + +For reference, a template for the secret is given below: + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: runner-secret + namespace: "my-gitea-namespace" +type: Opaque +stringData: + runner-token: "my-cool-runner-token-given-by-gitea" +``` + +### Rootless Options + +If `.Values.statefulset.dind.rootless: true` is set, then the following will be required: +`.Values.statefulset.dind.tag` must be a rootless image such as: `29.3.1-dind-rootless` + ## Parameters ### Gitea Actions @@ -46,8 +58,6 @@ You should be good to go! | Name | Description | Value | | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | | `enabled` | Create an act runner StatefulSet. | `false` | -| `init.image.repository` | The image used for the init containers | `busybox` | -| `init.image.tag` | The image tag used for the init containers | `1.37.0` | | `statefulset.replicas` | the amount of (replica) runner pods deployed | `1` | | `statefulset.timezone` | is the timezone that will be set in the act_runner image | `Etc/UTC` | | `statefulset.annotations` | Act runner annotations | `{}` | @@ -79,9 +89,6 @@ You should be good to go! | `statefulset.persistence.size` | Size for persistence to store act runner data | `1Gi` | | `statefulset.securityContext` | Customize the SecurityContext | `{}` | | `statefulset.serviceAccountName` | Customize the service account name | `""` | -| `existingSecret` | Secret that contains the token | `""` | -| `existingSecretKey` | Secret key | `""` | -| `giteaRootURL` | URL the act_runner registers and connect with | `""` | ### Gitea Actions Init @@ -93,8 +100,26 @@ You should be good to go! | `init.image.digest` | Image digest. Allows to pin the given image tag. Useful for having control over mutable tags like `latest` | `""` | | `init.image.pullPolicy` | The init image pullPolicy | `IfNotPresent` | | `init.image.fullOverride` | Completely overrides the image registry, path/image, tag and digest. | `""` | -| `preExtraInitContainers` | Additional init containers to run in the pod before Gitea-actions runs it owns init containers. | `[]` | -| `postExtraInitContainers` | Additional init containers to run in the pod after Gitea-actions runs it owns init containers. | `[]` | + +### Runner Token Secret Configuration + +| Name | Description | Value | +| ------------------- | ------------------------------ | ----- | +| `existingSecret` | Secret that contains the token | `""` | +| `existingSecretKey` | Secret key | `""` | + +### Gitea URL Setting + +| Name | Description | Value | +| -------------- | --------------------------------------------- | ----- | +| `giteaRootURL` | URL the act_runner registers and connect with | `""` | + +### Extra Init Containers + +| Name | Description | Value | +| ------------------------- | ----------------------------------------------------------------------------------------------- | ----- | +| `preExtraInitContainers` | Additional init containers to run in the pod before Gitea-actions runs it owns init containers. | `[]` | +| `postExtraInitContainers` | Additional init containers to run in the pod after Gitea-actions runs it owns init containers. | `[]` | ### Global diff --git a/docs/actions-dev.md b/docs/actions-dev.md index 2f69659..7a6c83e 100644 --- a/docs/actions-dev.md +++ b/docs/actions-dev.md @@ -26,8 +26,6 @@ In this case, you can use either the Web UI to generate the token or run a shell the command `gitea actions generate-runner-token`. After generating the token, you must create a secret and use it via: ```yaml -provisioning: - enabled: false existingSecret: "secret-name" existingSecretKey: "secret-key" ``` diff --git a/docs/share-dind-with-job-container.md b/docs/share-dind-with-job-container.md index 57cd949..f94fb1c 100644 --- a/docs/share-dind-with-job-container.md +++ b/docs/share-dind-with-job-container.md @@ -4,25 +4,19 @@ 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 + require_docker: true + docker_timeout: 300s ## Specify an existing token secret ## @@ -33,4 +27,4 @@ existingSecretKey: "token" giteaRootURL: "http://192.168.1.2:3000" ``` -Now you can run docker commands inside your jobs. \ No newline at end of file +Now you can run docker commands inside your jobs. diff --git a/values.yaml b/values.yaml index 198682a..015b639 100644 --- a/values.yaml +++ b/values.yaml @@ -2,8 +2,6 @@ ## @section Gitea Actions # ## @param enabled Create an act runner StatefulSet. -## @param init.image.repository The image used for the init containers -## @param init.image.tag The image tag used for the init containers ## @param statefulset.replicas the amount of (replica) runner pods deployed ## @param statefulset.timezone is the timezone that will be set in the act_runner image ## @param statefulset.annotations Act runner annotations @@ -35,9 +33,6 @@ ## @param statefulset.persistence.size Size for persistence to store act runner data ## @param statefulset.securityContext Customize the SecurityContext ## @param statefulset.serviceAccountName Customize the service account name -## @param existingSecret Secret that contains the token -## @param existingSecretKey Secret key -## @param giteaRootURL URL the act_runner registers and connect with enabled: false statefulset: replicas: 1 @@ -116,21 +111,27 @@ init: pullPolicy: IfNotPresent fullOverride: "" -## Specify an existing token secret -## +## @section Runner Token Secret Configuration +# +## @param existingSecret Secret that contains the token +## @param existingSecretKey Secret key existingSecret: "" existingSecretKey: "" -## Specify the root URL of the Gitea instance +## @section Gitea URL Setting +# +## @param giteaRootURL URL the act_runner registers and connect with giteaRootURL: "" +## @section Extra Init Containers +# ## @param preExtraInitContainers Additional init containers to run in the pod before gitea-actions runs it owns init containers. +## @param postExtraInitContainers Additional init containers to run in the pod after gitea-actions runs it owns init containers. preExtraInitContainers: [] # - name: pre-init-container # image: docker.io/library/busybox # command: [ /bin/sh, -c, 'echo "Hello world! I am a pre init container."' ] -## @param postExtraInitContainers Additional init containers to run in the pod after gitea-actions runs it owns init containers. postExtraInitContainers: [] # - name: post-init-container # image: docker.io/library/busybox