The `templates/gitea` subdirectory did not group anything meaningful, since every template of this chart belongs to Gitea. It only duplicated the chart name in every path and forced the unit tests to spell out `templates/gitea/<name>.yaml`, while `_helpers.tpl` and `NOTES.txt` already lived directly in `templates`. All templates now live in `templates`, which matches the layout of the bundled sub-charts and the Helm defaults. The checksum helper in `templates/_secrets.tpl` built its include path from `$root.Template.BasePath` and therefore carried the subdirectory in a `printf` format string instead of a literal path. Without adjusting it the chart failed to render with "no template gitea/templates/gitea/secret_config.yaml associated with template gotpl". Co-authored-by: Copilot <copilot@github.com>
70 lines
2.3 KiB
YAML
70 lines
2.3 KiB
YAML
suite: deployment template (SSH configuration)
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/deployment.yaml
|
|
- templates/secret_admin.yaml
|
|
- templates/secret_config.yaml
|
|
- templates/secret_gpg.yaml
|
|
- templates/secret_init.yaml
|
|
- templates/secret_inlineConfig.yaml
|
|
- templates/secret_metrics.yaml
|
|
tests:
|
|
- it: supports defining SSH log level for root based image
|
|
template: templates/deployment.yaml
|
|
set:
|
|
deployment.gitea.image.rootless: false
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: SSH_LOG_LEVEL
|
|
value: "INFO"
|
|
- it: supports overriding SSH log level
|
|
template: templates/deployment.yaml
|
|
set:
|
|
deployment.gitea.image.rootless: false
|
|
gitea.ssh.logLevel: "DEBUG"
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: SSH_LOG_LEVEL
|
|
value: "DEBUG"
|
|
- it: supports overriding SSH log level (even when image.fullOverride set)
|
|
template: templates/deployment.yaml
|
|
set:
|
|
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
|
|
deployment.gitea.image.rootless: false
|
|
gitea.ssh.logLevel: "DEBUG"
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: SSH_LOG_LEVEL
|
|
value: "DEBUG"
|
|
- it: skips SSH_LOG_LEVEL for rootless image
|
|
template: templates/deployment.yaml
|
|
set:
|
|
deployment.gitea.image.rootless: true
|
|
gitea.ssh.logLevel: "DEBUG" # explicitly defining a non-standard level here
|
|
asserts:
|
|
- notContains:
|
|
path: spec.template.spec.containers[0].env
|
|
any: true
|
|
content:
|
|
name: SSH_LOG_LEVEL
|
|
- it: skips SSH_LOG_LEVEL for rootless image (even when image.fullOverride set)
|
|
template: templates/deployment.yaml
|
|
set:
|
|
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
|
|
deployment.gitea.image.rootless: true
|
|
gitea.ssh.logLevel: "DEBUG" # explicitly defining a non-standard level here
|
|
asserts:
|
|
- notContains:
|
|
path: spec.template.spec.containers[0].env
|
|
any: true
|
|
content:
|
|
name: SSH_LOG_LEVEL
|