3cf91bf6e7
### Description of the change This PR is a continuation of the work done by @dgershman in [534](https://gitea.com/gitea/helm-chart/pulls/534), to allow users to override the image from the default rootless behavior of appending `-rootless` to the end of the image tag. ### Benefits Allows more flexibility to use externally maintained images that are rootless but don't follow the `-rootless` tag convention. ### Applicable issues - fixes #532 ### Additional information No breaking changes. This does not affect the `image.rootless` conditional checks or the current behavior if someone still wants to rely on the chart to append `-rootless`. ### Checklist - [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] Breaking changes are documented in the `README.md` - [x] Templating unittests are added Co-authored-by: TristanHoladay <40547442+TristanHoladay@users.noreply.github.com> Co-authored-by: pat-s <pat-s@noreply.gitea.com> Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/550 Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.com> Reviewed-by: pat-s <pat-s@noreply.gitea.com> Co-authored-by: TristanHoladay <tristanholaday@noreply.gitea.com> Co-committed-by: TristanHoladay <tristanholaday@noreply.gitea.com>
65 lines
2.0 KiB
YAML
65 lines
2.0 KiB
YAML
suite: deployment template (SSH configuration)
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/gitea/deployment.yaml
|
|
- templates/gitea/config.yaml
|
|
tests:
|
|
- it: supports defining SSH log level for root based image
|
|
template: templates/gitea/deployment.yaml
|
|
set:
|
|
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/gitea/deployment.yaml
|
|
set:
|
|
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/gitea/deployment.yaml
|
|
set:
|
|
image.fullOverride: gitea/gitea:1.19.3
|
|
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/gitea/deployment.yaml
|
|
set:
|
|
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/gitea/deployment.yaml
|
|
set:
|
|
image.fullOverride: gitea/gitea:1.19.3
|
|
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
|