feat: allow inline yaml config instead of string literal #43

Merged
DaanSelen merged 2 commits from feat-inline-yaml-config into main 2025-09-21 18:21:35 +00:00
Member

Description of the change

Allow to insert the act_runner config as yaml into the chart values.

Benefits

Yaml editor will report yaml errors, instead of the deployed runner.

Possible drawbacks

No limitations, string config works like before.

Applicable issues

N/A

Additional information

Usage like this, just omit the block scalar token

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" 

I do not like the regex test approach, but I didn't come up with a better one. I wish that I can parse the nested yaml in the helm tests.

⚠ BREAKING

N/A

Checklist

  • Helm templating unittests are added (required when changing anything in templates folder)
  • All added template resources MUST render a namespace in metadata
### Description of the change Allow to insert the act_runner config as yaml into the chart values. ### Benefits Yaml editor will report yaml errors, instead of the deployed runner. ### Possible drawbacks No limitations, string config works like before. ### Applicable issues N/A ### Additional information Usage like this, just omit the block scalar token ```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" ``` I do not like the regex test approach, but I didn't come up with a better one. I wish that I can parse the nested yaml in the helm tests. ### ⚠ BREAKING N/A ### Checklist - [x] Helm templating unittests are added (required when changing anything in `templates` folder) - [x] All added template resources MUST render a namespace in metadata
ChristopherHX added 1 commit 2025-08-24 18:35:11 +00:00
feat: allow inline yaml config instead of string literal
Some checks failed
Lint Shell files / shellcheck (pull_request) Successful in 18s
commitlint / check-and-test (pull_request) Successful in 6s
check-and-test / check-and-test (pull_request) Failing after 25s
0630164f91
ChristopherHX requested review from DaanSelen 2025-08-24 18:35:11 +00:00
ChristopherHX requested review from volker.raschek 2025-08-24 18:35:11 +00:00
Member

If I might ask, but what does it solve? Or just a feature upgrade.

If I might ask, but what does it solve? Or just a feature upgrade.
Author
Member

just a feature upgrade.

yes just a feature upgrade, writing yaml correctly is not easy for everyone, let helm fail early if it sees bad yaml is good?

> just a feature upgrade. yes just a feature upgrade, writing yaml correctly is not easy for everyone, let helm fail early if it sees bad yaml is good?
ChristopherHX added 1 commit 2025-08-24 19:01:53 +00:00
fix lint
All checks were successful
Lint Shell files / shellcheck (pull_request) Successful in 19s
check-and-test / check-and-test (pull_request) Successful in 22s
6c0c43712c
Author
Member

You also gain yaml syntax highlighting by not using a string block of yaml

You also gain yaml syntax highlighting by not using a string block of yaml
DaanSelen approved these changes 2025-08-24 19:51:29 +00:00
DaanSelen merged commit bd2fcb14be into main 2025-09-21 18:21:35 +00:00
Sign in to join this conversation.
No description provided.