3 Commits

Author SHA1 Message Date
b91d297e32 feat(chart): Make the securityContext for the StatefulSet configurable (#62)
<!--
 Before you open the request please review the following guidelines and tips to help it be more easily integrated:

 - Describe the scope of your change - i.e. what the change does.
 - Describe any known limitations with your change.
 - Please run any tests or examples that can exercise your modified code.

 Thank you for contributing! We will try to review, test and integrate the change as soon as we can.
 -->

### Description of the change

<!-- Describe the scope of your change - i.e. what the change does. -->

This patch adds the ability to **customize the `SecurityContext`** for the `statefulset` of the Gitea Actions `act_runner`.
This allows users to configure pod-level security settings, such as `fsGroup` and `fsGroupChangePolicy`.
The patch introduces `statefulset.podSecurityContext` as a new configurable parameter.

### Benefits

<!-- What benefits will be realized by the code change? -->
This change makes the chart more configurable for different kinds of deployment scenarios.

### Possible drawbacks

<!-- Describe any known limitations with your change -->

### Applicable issues

<!-- Enter any applicable Issues here (You can reference an issue using #). Please remove this section if there is no referenced issue. -->
- Fixes #

### Additional information

<!-- If there's anything else that's important and relevant to your pull request, mention that information here. Please remove this section if it remains empty. -->

  * The patch only adds the ability to customize the `podSecurityContext` for the `statefulset`. It does not modify any other security settings or introduce new features beyond this customization.
  * The default value for `statefulset.podSecurityContext` is an empty object `{}`, meaning no security context is applied unless the user explicitly defines it.

### ⚠ BREAKING

<!-- If there's a breaking change, please shortly describe in which way users are affected and how they can mitigate it. If there are no breakings, please remove this section. -->

### Checklist

<!-- [Place an '[X]' (no spaces) in all applicable fields. Please remove unrelated fields.] -->

- [X] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm)
- [X] Helm templating unittests are added (required when changing anything in `templates` folder)
- [X] All added template resources MUST render a namespace in metadata

Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/62
Reviewed-by: DaanSelen <daanselen@noreply.gitea.com>
Co-authored-by: Stephen Sullivan <sjsullivan7@gmail.com>
Co-committed-by: Stephen Sullivan <sjsullivan7@gmail.com>
2025-11-03 17:43:27 +00:00
0536d625cf chore(deps): update workflow dependencies (minor & patch) (#72)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [docker.io/thegeeklab/git-sv](https://github.com/thegeeklab/git-sv) | container | patch | `2.0.5` -> `2.0.6` |
| [helm-unittest/helm-unittest](https://github.com/helm-unittest/helm-unittest) |  | patch | `v1.0.1` -> `v1.0.3` |

---

### Release Notes

<details>
<summary>thegeeklab/git-sv (docker.io/thegeeklab/git-sv)</summary>

### [`v2.0.6`](https://github.com/thegeeklab/git-sv/releases/tag/v2.0.6)

[Compare Source](https://github.com/thegeeklab/git-sv/compare/v2.0.5...v2.0.6)

#### v2.0.6 (2025-10-09)

##### Others

- **docker:** update docker.io/library/alpine:3.22 docker digest to [`4b7ce07`](https://github.com/thegeeklab/git-sv/commit/4b7ce07) ([#&#8203;242](https://github.com/thegeeklab/git-sv/issues/242)) ([`8b2925b`](https://github.com/thegeeklab/git-sv/commit/8b2925b))
- **docker:** update docker.io/library/golang:1.25.1 docker digest to [`d709837`](https://github.com/thegeeklab/git-sv/commit/d709837) ([#&#8203;240](https://github.com/thegeeklab/git-sv/issues/240)) ([`07bbbc0`](https://github.com/thegeeklab/git-sv/commit/07bbbc0))
- **docker:** update docker.io/library/golang:1.25.1 docker digest to [`ab1f5c4`](https://github.com/thegeeklab/git-sv/commit/ab1f5c4) ([#&#8203;239](https://github.com/thegeeklab/git-sv/issues/239)) ([`c21a62e`](https://github.com/thegeeklab/git-sv/commit/c21a62e))
- **deps:** update dependency golangci/golangci-lint to v2.5.0 ([#&#8203;238](https://github.com/thegeeklab/git-sv/issues/238)) ([`2f590aa`](https://github.com/thegeeklab/git-sv/commit/2f590aa))
- **docker:** update docker.io/library/golang:1.25.1 docker digest to [`8305f5f`](https://github.com/thegeeklab/git-sv/commit/8305f5f) ([#&#8203;237](https://github.com/thegeeklab/git-sv/issues/237)) ([`cd5f1f0`](https://github.com/thegeeklab/git-sv/commit/cd5f1f0))

##### CI Pipeline

- refactor makefile go deps ([`50efb99`](https://github.com/thegeeklab/git-sv/commit/50efb99))

</details>

<details>
<summary>helm-unittest/helm-unittest (helm-unittest/helm-unittest)</summary>

### [`v1.0.3`](https://github.com/helm-unittest/helm-unittest/releases/tag/v1.0.3)

[Compare Source](https://github.com/helm-unittest/helm-unittest/compare/v1.0.2...v1.0.3)

**Fixes**

- Corrected newlines which is handled incorrectly by the yaml library (resolves [#&#8203;756](https://github.com/helm-unittest/helm-unittest/issues/756))

**Updates**

- Update packages to latest patch versions
- Update pipeline actions
- Update documentation

**Additional note**
*Due to this fix snapshots that contain output with a string line-ending need to be updated.*

### [`v1.0.2`](https://github.com/helm-unittest/helm-unittest/releases/tag/v1.0.2)

[Compare Source](https://github.com/helm-unittest/helm-unittest/compare/v1.0.1...v1.0.2)

**Improvements**

- Replaced yaml library with a maintained alternative (resolves [#&#8203;501](https://github.com/helm-unittest/helm-unittest/issues/501))

**Updates**

- Update packages to latest patch versions
- Update pipeline actions
- Update documentation

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xOC4xIiwidXBkYXRlZEluVmVyIjoiNDEuMTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsia2luZC9kZXBlbmRlbmN5Il19-->

Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/72
Reviewed-by: DaanSelen <daanselen@noreply.gitea.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-11-03 17:40:20 +00:00
f23fa6f28e chore(deps): update commitlint/commitlint docker tag to v20 (#70)
Some checks failed
changelog / changelog (push) Has been cancelled
check-and-test / check-and-test (push) Has been cancelled
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [commitlint/commitlint](https://github.com/conventional-changelog/commitlint) | container | major | `19.9.1` -> `20.1.0` |

---

### Release Notes

<details>
<summary>conventional-changelog/commitlint (commitlint/commitlint)</summary>

### [`v20.1.0`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2010-2025-09-30)

[Compare Source](https://github.com/conventional-changelog/commitlint/compare/v20.0.0...v20.1.0)

##### Bug Fixes

- **resolve-extends:** add import attribute for JSON config files ([#&#8203;4551](https://github.com/conventional-changelog/commitlint/issues/4551)) ([82936c9](82936c90a2))

##### Features

- **config-pnpm-scopes:** allow global scope ([#&#8203;4553](https://github.com/conventional-changelog/commitlint/issues/4553)) ([e571970](e571970614))

### [`v20.0.0`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2000-2025-09-25)

[Compare Source](https://github.com/conventional-changelog/commitlint/compare/v19.9.1...v20.0.0)

##### Bug Fixes

- update dependency tar-fs to v3.1.1 \[security] ([#&#8203;4550](https://github.com/conventional-changelog/commitlint/issues/4550)) ([273a43e](273a43e359))

- feat(rules)!: make body-max-line-length ignore lines with URLs ([#&#8203;4486](https://github.com/conventional-changelog/commitlint/issues/4486)) ([2f37a88](2f37a886be)), closes [#&#8203;4486](https://github.com/conventional-changelog/commitlint/issues/4486)

##### BREAKING CHANGES

- when lines contain URLs exceeding the maximum
  line length `body-max-line-length` will be ignored

#### [19.9.1](https://github.com/conventional-changelog/commitlint/compare/v19.9.0...v19.9.1) (2025-08-29)

##### Bug Fixes

- add TypeScript support and configuration for pnpm scopes ([#&#8203;4544](https://github.com/conventional-changelog/commitlint/issues/4544)) ([ea75778](ea75778e8d))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xOC4xIiwidXBkYXRlZEluVmVyIjoiNDEuMTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsia2luZC9kZXBlbmRlbmN5Il19-->

Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/70
Reviewed-by: DaanSelen <daanselen@noreply.gitea.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-10-27 08:09:26 +00:00
7 changed files with 62 additions and 3 deletions

View File

@ -8,7 +8,7 @@ on:
jobs:
changelog:
runs-on: ubuntu-latest
container: docker.io/thegeeklab/git-sv:2.0.5
container: docker.io/thegeeklab/git-sv:2.0.6
steps:
- name: install tools
run: |

View File

@ -11,7 +11,7 @@ on:
jobs:
check-and-test:
runs-on: ubuntu-latest
container: commitlint/commitlint:19.9.1
container: commitlint/commitlint:20.1.0
steps:
- uses: actions/checkout@v5
- name: check PR title

View File

@ -10,7 +10,7 @@ on:
env:
# renovate: datasource=github-releases depName=helm-unittest/helm-unittest
HELM_UNITTEST_VERSION: "v1.0.1"
HELM_UNITTEST_VERSION: "v1.0.3"
jobs:
check-and-test:

View File

@ -75,6 +75,7 @@ You should be good to go!
| `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.persistence.size` | Size for persistence to store act runner data | `1Gi` |
| `statefulset.securityContext` | Customize the SecurityContext | `{}` |
| `existingSecret` | Secret that contains the token | `""` |
| `existingSecretKey` | Secret key | `""` |
| `giteaRootURL` | URL the act_runner registers and connect with | `""` |

View File

@ -30,6 +30,8 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
securityContext:
{{- toYaml .Values.statefulset.securityContext | nindent 8 }}
initContainers:
- name: init-gitea
image: "{{ include "gitea.actions.init.image" . }}"

View File

@ -162,6 +162,60 @@ tests:
- matchRegex:
path: spec.template.spec.containers[0].env[8].name
pattern: "GITEA_RUNNER_NAME"
- it: Has fsGroup in securityContext
template: templates/statefulset.yaml
set:
enabled: true
existingSecret: "my-secret"
existingSecretKey: "my-secret-key"
statefulset.securityContext:
fsGroup: 1000
asserts:
- hasDocuments:
count: 1
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-unittests-actions-act-runner
- equal:
path: spec.template.spec.securityContext["fsGroup"]
value: 1000
- it: Has fsGroupChangePolicy in securityContext
template: templates/statefulset.yaml
set:
enabled: true
existingSecret: "my-secret"
existingSecretKey: "my-secret-key"
statefulset.securityContext:
fsGroupChangePolicy: OnRootMismatch
asserts:
- hasDocuments:
count: 1
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-unittests-actions-act-runner
- equal:
path: spec.template.spec.securityContext["fsGroupChangePolicy"]
value: "OnRootMismatch"
- it: Has Always in securityContext
template: templates/statefulset.yaml
set:
enabled: true
existingSecret: "my-secret"
existingSecretKey: "my-secret-key"
statefulset.securityContext:
fsGroupChangePolicy: Always
asserts:
- hasDocuments:
count: 1
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-unittests-actions-act-runner
- equal:
path: spec.template.spec.securityContext["fsGroupChangePolicy"]
value: "Always"
- it: doesn't renders a StatefulSet by default
template: templates/statefulset.yaml
asserts:

View File

@ -31,6 +31,7 @@
## @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.persistence.size Size for persistence to store act runner data
## @param statefulset.securityContext Customize the SecurityContext
## @param existingSecret Secret that contains the token
## @param existingSecretKey Secret key
## @param giteaRootURL URL the act_runner registers and connect with
@ -45,6 +46,7 @@ statefulset:
tolerations: []
affinity: {}
extraVolumes: []
securityContext: {}
actRunner:
registry: "docker.gitea.com"