refactor(templates): move the templates out of the gitea subdirectory
Helm / helm-lint (push) Successful in 9s
changelog / changelog (push) Successful in 29s
Helm / helm-unittest (push) Failing after 21s
Markdown linter / markdown-lint (push) Successful in 17s
Markdown linter / markdown-link-checker (push) Successful in 56s

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>
This commit is contained in:
2026-09-14 20:28:17 +02:00
co-authored by Copilot
parent 0a237ba2c1
commit 552fe8c56e
83 changed files with 291 additions and 291 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ image:
### Templates ### Templates
- Helm templates live in `templates/gitea/`. Helpers live in `templates/_helpers.tpl`. - Helm templates live in `templates/`. Helpers live in `templates/_helpers.tpl`.
- Use camelCase for all files and variables (e.g `httpRoute`, `backendTLSPolicy`, `gatewayAPI`, `statefulSet`). - Use camelCase for all files and variables (e.g `httpRoute`, `backendTLSPolicy`, `gatewayAPI`, `statefulSet`).
- Use `include "gitea.fullname"` for naming resources. - Use `include "gitea.fullname"` for naming resources.
- Use `fail` for required-value validation with clear error messages referencing the full values path. - Use `fail` for required-value validation with clear error messages referencing the full values path.
+2 -2
View File
@@ -267,7 +267,7 @@ If `.Values.deployment.gitea.image.rootless: true`, then the following will occu
- `$HOME` becomes `/data/gitea/git` - `$HOME` becomes `/data/gitea/git`
[see deployment.yaml](./templates/gitea/deployment.yaml) template inside (init-)container "env" declarations [see deployment.yaml](./templates/deployment.yaml) template inside (init-)container "env" declarations
- `START_SSH_SERVER: true` (Unless explicity overwritten by `gitea.config.server.START_SSH_SERVER`) - `START_SSH_SERVER: true` (Unless explicity overwritten by `gitea.config.server.START_SSH_SERVER`)
@@ -279,7 +279,7 @@ If `.Values.deployment.gitea.image.rootless: true`, then the following will occu
- `SSH_LOG_LEVEL` environment variable is not injected into the container - `SSH_LOG_LEVEL` environment variable is not injected into the container
[see deployment.yaml](./templates/gitea/deployment.yaml) template inside container "env" declarations [see deployment.yaml](./templates/deployment.yaml) template inside container "env" declarations
#### OpenShift Compatibility #### OpenShift Compatibility
@@ -54,7 +54,7 @@ Arguments: (list $root $key)
{{- $name := include (printf "gitea.secret.%s.name" $key) $root -}} {{- $name := include (printf "gitea.secret.%s.name" $key) $root -}}
{{- lookup "v1" "Secret" $namespace $name | toYaml | sha256sum -}} {{- lookup "v1" "Secret" $namespace $name | toYaml | sha256sum -}}
{{- else -}} {{- else -}}
{{- include (printf "%s/gitea/secret_%s.yaml" $root.Template.BasePath $key) $root | sha256sum -}} {{- include (printf "%s/secret_%s.yaml" $root.Template.BasePath $key) $root | sha256sum -}}
{{- end -}} {{- end -}}
{{- end }} {{- end }}
+1 -1
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
tests: tests:
- it: skips rendering when the admin user is disabled - it: skips rendering when the admin user is disabled
set: set:
+3 -3
View File
@@ -3,17 +3,17 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
tests: tests:
- it: "actions are enabled by default (based on vanilla Gitea behavior)" - it: "actions are enabled by default (based on vanilla Gitea behavior)"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
notExists: notExists:
path: stringData.actions path: stringData.actions
- it: "actions can be disabled via inline config" - it: "actions can be disabled via inline config"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
gitea.config.actions.ENABLED: false gitea.config.actions.ENABLED: false
asserts: asserts:
+3 -3
View File
@@ -4,7 +4,7 @@ release:
namespace: testing namespace: testing
tests: tests:
- it: "cache is configured correctly for valkey" - it: "cache is configured correctly for valkey"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
valkey: valkey:
enabled: true enabled: true
@@ -17,7 +17,7 @@ tests:
HOST=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s& HOST=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
- it: "cache is configured correctly for 'memory' when valkey is disabled" - it: "cache is configured correctly for 'memory' when valkey is disabled"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
valkey: valkey:
enabled: false enabled: false
@@ -30,7 +30,7 @@ tests:
HOST= HOST=
- it: "cache can be customized when valkey is disabled" - it: "cache can be customized when valkey is disabled"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
valkey: valkey:
enabled: false enabled: false
@@ -3,11 +3,11 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
tests: tests:
- it: uses `gitea config edit-ini` to write app.ini from environment variables - it: uses `gitea config edit-ini` to write app.ini from environment variables
template: templates/gitea/secret_config.yaml template: templates/secret_config.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
matchRegex: matchRegex:
@@ -4,7 +4,7 @@ release:
namespace: testing namespace: testing
tests: tests:
- it: metrics token is set - it: metrics token is set
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
gitea: gitea:
metrics: metrics:
@@ -18,7 +18,7 @@ tests:
ENABLED=true ENABLED=true
TOKEN=somepassword TOKEN=somepassword
- it: metrics token is empty - it: metrics token is empty
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
gitea: gitea:
metrics: metrics:
@@ -31,7 +31,7 @@ tests:
value: |- value: |-
ENABLED=true ENABLED=true
- it: metrics token is nil - it: metrics token is nil
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
gitea: gitea:
metrics: metrics:
@@ -44,7 +44,7 @@ tests:
value: |- value: |-
ENABLED=true ENABLED=true
- it: does not configures a token if metrics are disabled - it: does not configures a token if metrics are disabled
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
gitea: gitea:
metrics: metrics:
+3 -3
View File
@@ -4,7 +4,7 @@ release:
namespace: testing namespace: testing
tests: tests:
- it: "queue is configured correctly for valkey" - it: "queue is configured correctly for valkey"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
valkey: valkey:
enabled: true enabled: true
@@ -17,7 +17,7 @@ tests:
TYPE=redis TYPE=redis
- it: "queue is configured correctly for 'levelDB' when valkey is disabled" - it: "queue is configured correctly for 'levelDB' when valkey is disabled"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
valkey: valkey:
enabled: false enabled: false
@@ -30,7 +30,7 @@ tests:
TYPE=level TYPE=level
- it: "queue can be customized when valkey is disabled" - it: "queue can be customized when valkey is disabled"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
valkey: valkey:
enabled: false enabled: false
@@ -4,7 +4,7 @@ release:
namespace: testing namespace: testing
tests: tests:
- it: "[default values] uses ingress host for DOMAIN|SSH_DOMAIN|ROOT_URL" - it: "[default values] uses ingress host for DOMAIN|SSH_DOMAIN|ROOT_URL"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
matchRegex: matchRegex:
@@ -22,7 +22,7 @@ tests:
################################################ ################################################
- it: "[no ingress hosts] uses gitea http service for DOMAIN|SSH_DOMAIN|ROOT_URL" - it: "[no ingress hosts] uses gitea http service for DOMAIN|SSH_DOMAIN|ROOT_URL"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
ingress: ingress:
hosts: [] hosts: []
@@ -43,7 +43,7 @@ tests:
################################################ ################################################
- it: "[provided via values] uses that for DOMAIN|SSH_DOMAIN|ROOT_URL" - it: "[provided via values] uses that for DOMAIN|SSH_DOMAIN|ROOT_URL"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
gitea.config.server.DOMAIN: provided.example.com gitea.config.server.DOMAIN: provided.example.com
ingress: ingress:
@@ -69,7 +69,7 @@ tests:
################################################ ################################################
- it: "[route enabled] uses route host for DOMAIN|SSH_DOMAIN|ROOT_URL" - it: "[route enabled] uses route host for DOMAIN|SSH_DOMAIN|ROOT_URL"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
route: route:
enabled: true enabled: true
@@ -91,7 +91,7 @@ tests:
################################################ ################################################
- it: "[route tls termination] uses https for ROOT_URL" - it: "[route tls termination] uses https for ROOT_URL"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
route: route:
enabled: true enabled: true
@@ -107,7 +107,7 @@ tests:
################################################ ################################################
- it: "[HTTPRoute enabled] uses first hostname for DOMAIN|SSH_DOMAIN|ROOT_URL" - it: "[HTTPRoute enabled] uses first hostname for DOMAIN|SSH_DOMAIN|ROOT_URL"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
ingress: ingress:
hosts: [] hosts: []
@@ -137,7 +137,7 @@ tests:
################################################ ################################################
- it: "[HTTPRoute tls] switches ROOT_URL to https" - it: "[HTTPRoute tls] switches ROOT_URL to https"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
ingress: ingress:
hosts: [] hosts: []
+3 -3
View File
@@ -4,7 +4,7 @@ release:
namespace: testing namespace: testing
tests: tests:
- it: "session is configured correctly for valkey" - it: "session is configured correctly for valkey"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
valkey: valkey:
enabled: true enabled: true
@@ -17,7 +17,7 @@ tests:
PROVIDER_CONFIG=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s& PROVIDER_CONFIG=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
- it: "session is configured correctly for 'memory' when valkey is disabled" - it: "session is configured correctly for 'memory' when valkey is disabled"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
valkey: valkey:
enabled: false enabled: false
@@ -30,7 +30,7 @@ tests:
PROVIDER_CONFIG= PROVIDER_CONFIG=
- it: "session can be customized when valkey is disabled" - it: "session can be customized when valkey is disabled"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
set: set:
valkey: valkey:
enabled: false enabled: false
@@ -106,7 +106,7 @@ tests:
name: gitea-unittests-postgresql-ha-pgpool name: gitea-unittests-postgresql-ha-pgpool
namespace: testing namespace: testing
- it: "[gitea] connects to pgpool service" - it: "[gitea] connects to pgpool service"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
matchRegex: matchRegex:
@@ -115,14 +115,14 @@ tests:
- it: "[gitea] connects to pgpool service with custom cluster domain" - it: "[gitea] connects to pgpool service with custom cluster domain"
set: set:
clusterDomain: my-special-cluster.local clusterDomain: my-special-cluster.local
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
matchRegex: matchRegex:
path: stringData.database path: stringData.database
pattern: HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.my-special-cluster.local:1234 pattern: HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.my-special-cluster.local:1234
- it: "[gitea] connects to configured database" - it: "[gitea] connects to configured database"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
matchRegex: matchRegex:
@@ -65,7 +65,7 @@ tests:
name: gitea-unittests-postgresql name: gitea-unittests-postgresql
namespace: testing namespace: testing
- it: "[gitea] connects to postgresql service" - it: "[gitea] connects to postgresql service"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
matchRegex: matchRegex:
@@ -74,14 +74,14 @@ tests:
- it: "[gitea] connects to postgresql service with custom cluster domain" - it: "[gitea] connects to postgresql service with custom cluster domain"
set: set:
clusterDomain: my-special-cluster.local clusterDomain: my-special-cluster.local
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
matchRegex: matchRegex:
path: stringData.database path: stringData.database
pattern: HOST=gitea-unittests-postgresql.testing.svc.my-special-cluster.local:1234 pattern: HOST=gitea-unittests-postgresql.testing.svc.my-special-cluster.local:1234
- it: "[gitea] connects to configured database" - it: "[gitea] connects to configured database"
template: templates/gitea/secret_inlineConfig.yaml template: templates/secret_inlineConfig.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
matchRegex: matchRegex:
@@ -35,7 +35,7 @@ tests:
targetPort: tcp targetPort: tcp
protocol: TCP protocol: TCP
- it: "[gitea] waits for valkey to be up and running" - it: "[gitea] waits for valkey to be up and running"
template: templates/gitea/secret_init.yaml template: templates/secret_init.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
matchRegex: matchRegex:
@@ -44,7 +44,7 @@ tests:
- it: "[gitea] waits for valkey to be up and running with custom cluster domain" - it: "[gitea] waits for valkey to be up and running with custom cluster domain"
set: set:
clusterDomain: my-special-cluster.local clusterDomain: my-special-cluster.local
template: templates/gitea/secret_init.yaml template: templates/secret_init.yaml
asserts: asserts:
- documentIndex: 0 - documentIndex: 0
matchRegex: matchRegex:
+11 -11
View File
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: fails with multiple replicas and "GIT_GC_REPOS" enabled - it: fails with multiple replicas and "GIT_GC_REPOS" enabled
template: templates/gitea/secret_config.yaml template: templates/secret_config.yaml
set: set:
deployment: deployment:
replicas: 2 replicas: 2
@@ -29,7 +29,7 @@ tests:
- failedTemplate: - failedTemplate:
errorMessage: "Invoking the garbage collector via CRON is not yet supported when running with multiple replicas. Please set 'gitea.config.cron.GIT_GC_REPOS.enabled = false'." errorMessage: "Invoking the garbage collector via CRON is not yet supported when running with multiple replicas. Please set 'gitea.config.cron.GIT_GC_REPOS.enabled = false'."
- it: fails with multiple replicas and RWX file system not set - it: fails with multiple replicas and RWX file system not set
template: templates/gitea/secret_config.yaml template: templates/secret_config.yaml
set: set:
deployment: deployment:
replicas: 2 replicas: 2
@@ -37,7 +37,7 @@ tests:
- failedTemplate: - failedTemplate:
errorMessage: "When using multiple replicas, a RWX file system is required and persistence.new.accessModes[0] must be set to ReadWriteMany." errorMessage: "When using multiple replicas, a RWX file system is required and persistence.new.accessModes[0] must be set to ReadWriteMany."
- it: fails with multiple replicas and bleve issue indexer - it: fails with multiple replicas and bleve issue indexer
template: templates/gitea/secret_config.yaml template: templates/secret_config.yaml
set: set:
deployment: deployment:
replicas: 2 replicas: 2
@@ -53,7 +53,7 @@ tests:
- failedTemplate: - failedTemplate:
errorMessage: "When using multiple replicas, the issue indexer (gitea.config.indexer.ISSUE_INDEXER_TYPE) must be set to a HA-ready provider such as 'meilisearch', 'elasticsearch' or 'db' (if the DB is HA-ready)." errorMessage: "When using multiple replicas, the issue indexer (gitea.config.indexer.ISSUE_INDEXER_TYPE) must be set to a HA-ready provider such as 'meilisearch', 'elasticsearch' or 'db' (if the DB is HA-ready)."
- it: fails with multiple replicas and bleve repo indexer - it: fails with multiple replicas and bleve repo indexer
template: templates/gitea/secret_config.yaml template: templates/secret_config.yaml
set: set:
deployment: deployment:
replicas: 2 replicas: 2
+11 -11
View File
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: reads the admin credentials from the generated secret - it: reads the admin credentials from the generated secret
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- contains: - contains:
path: spec.template.spec.initContainers[2].env path: spec.template.spec.initContainers[2].env
@@ -45,7 +45,7 @@ tests:
value: keepUpdated value: keepUpdated
- it: reads the admin credentials from the configured keys of an existing secret - it: reads the admin credentials from the configured keys of an existing secret
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.admin.existingSecret.enabled: true secrets.admin.existingSecret.enabled: true
secrets.admin.existingSecret.secretName: custom-admin-secret secrets.admin.existingSecret.secretName: custom-admin-secret
@@ -79,7 +79,7 @@ tests:
name: custom-admin-secret name: custom-admin-secret
- it: omits the admin environment when the admin user is disabled - it: omits the admin environment when the admin user is disabled
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.admin.enabled: false secrets.admin.enabled: false
asserts: asserts:
@@ -95,7 +95,7 @@ tests:
any: true any: true
- it: fails on an unsupported password mode - it: fails on an unsupported password mode
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.admin.passwordMode: unsupported secrets.admin.passwordMode: unsupported
asserts: asserts:
+39 -39
View File
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: renders a deployment - it: renders a deployment
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 1 count: 1
@@ -21,14 +21,14 @@ tests:
apiVersion: apps/v1 apiVersion: apps/v1
name: gitea-unittests name: gitea-unittests
- it: renders no deployment when disabled - it: renders no deployment when disabled
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.enabled: false deployment.enabled: false
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 0 count: 0
- it: deployment labels are set - it: deployment labels are set
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.labels: deployment.labels:
hello: world hello: world
@@ -46,7 +46,7 @@ tests:
content: content:
hello: world hello: world
- it: deployment labels are not in selector matchLabels - it: deployment labels are not in selector matchLabels
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.labels: deployment.labels:
custom-label: custom-value custom-label: custom-value
@@ -58,7 +58,7 @@ tests:
app.kubernetes.io/name: gitea app.kubernetes.io/name: gitea
app.kubernetes.io/instance: gitea-unittests app.kubernetes.io/instance: gitea-unittests
- it: deployment labels are always rendered - it: deployment labels are always rendered
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- isSubset: - isSubset:
path: metadata.labels path: metadata.labels
@@ -68,12 +68,12 @@ tests:
app.kubernetes.io/instance: gitea-unittests app.kubernetes.io/instance: gitea-unittests
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
- it: deployment annotations are undefined - it: deployment annotations are undefined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: metadata.annotations path: metadata.annotations
- it: deployment annotations are set - it: deployment annotations are set
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.annotations: deployment.annotations:
hello: world hello: world
@@ -86,7 +86,7 @@ tests:
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.nodeSelector path: spec.template.spec.nodeSelector
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
- it: nodeSelector is defined - it: nodeSelector is defined
set: set:
deployment.nodeSelector: deployment.nodeSelector:
@@ -98,14 +98,14 @@ tests:
content: content:
foo: bar foo: bar
bar: foo bar: foo
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
- it: affinity is undefined - it: affinity is undefined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.affinity path: spec.template.spec.affinity
- it: affinity is defined - it: affinity is defined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.affinity: deployment.affinity:
nodeAffinity: nodeAffinity:
@@ -129,12 +129,12 @@ tests:
values: values:
- linux - linux
- it: dnsConfig is undefined - it: dnsConfig is undefined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.dnsConfig path: spec.template.spec.dnsConfig
- it: dnsConfig is defined - it: dnsConfig is defined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.dnsConfig: deployment.dnsConfig:
nameservers: nameservers:
@@ -152,12 +152,12 @@ tests:
- name: ndots - name: ndots
value: "2" value: "2"
- it: priorityClassName is undefined - it: priorityClassName is undefined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.priorityClassName path: spec.template.spec.priorityClassName
- it: priorityClassName is defined - it: priorityClassName is defined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.priorityClassName: high-priority deployment.priorityClassName: high-priority
asserts: asserts:
@@ -165,12 +165,12 @@ tests:
path: spec.template.spec.priorityClassName path: spec.template.spec.priorityClassName
value: high-priority value: high-priority
- it: schedulerName is undefined - it: schedulerName is undefined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.schedulerName path: spec.template.spec.schedulerName
- it: schedulerName is defined - it: schedulerName is defined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.schedulerName: stork deployment.schedulerName: stork
asserts: asserts:
@@ -178,7 +178,7 @@ tests:
path: spec.template.spec.schedulerName path: spec.template.spec.schedulerName
value: stork value: stork
- it: strategy defaults to a rolling update - it: strategy defaults to a rolling update
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- equal: - equal:
path: spec.strategy path: spec.strategy
@@ -188,7 +188,7 @@ tests:
maxUnavailable: 0 maxUnavailable: 0
maxSurge: 100% maxSurge: 100%
- it: strategy omits rollingUpdate for other strategy types - it: strategy omits rollingUpdate for other strategy types
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.strategy.type: Recreate deployment.strategy.type: Recreate
asserts: asserts:
@@ -197,12 +197,12 @@ tests:
value: value:
type: Recreate type: Recreate
- it: tolerations are undefined - it: tolerations are undefined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.tolerations path: spec.template.spec.tolerations
- it: tolerations are defined - it: tolerations are defined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.tolerations: deployment.tolerations:
- key: database/type - key: database/type
@@ -218,12 +218,12 @@ tests:
value: postgres value: postgres
effect: NoSchedule effect: NoSchedule
- it: topologySpreadConstraints are undefined - it: topologySpreadConstraints are undefined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.topologySpreadConstraints path: spec.template.spec.topologySpreadConstraints
- it: topologySpreadConstraints are defined - it: topologySpreadConstraints are defined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.topologySpreadConstraints: deployment.topologySpreadConstraints:
- topologyKey: kubernetes.io/hostname - topologyKey: kubernetes.io/hostname
@@ -244,7 +244,7 @@ tests:
app.kubernetes.io/instance: gitea-unittests app.kubernetes.io/instance: gitea-unittests
- it: "injects TMP_EXISTING_ENVS_FILE as environment variable to 'init-app-ini' init container" - it: "injects TMP_EXISTING_ENVS_FILE as environment variable to 'init-app-ini' init container"
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- contains: - contains:
path: spec.template.spec.initContainers[1].env path: spec.template.spec.initContainers[1].env
@@ -252,7 +252,7 @@ tests:
name: TMP_EXISTING_ENVS_FILE name: TMP_EXISTING_ENVS_FILE
value: /tmp/existing-envs value: /tmp/existing-envs
- it: "injects ENV_TO_INI_MOUNT_POINT as environment variable to 'init-app-ini' init container" - it: "injects ENV_TO_INI_MOUNT_POINT as environment variable to 'init-app-ini' init container"
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- contains: - contains:
path: spec.template.spec.initContainers[1].env path: spec.template.spec.initContainers[1].env
@@ -260,7 +260,7 @@ tests:
name: ENV_TO_INI_MOUNT_POINT name: ENV_TO_INI_MOUNT_POINT
value: /env-to-ini-mounts value: /env-to-ini-mounts
- it: "deployment.gitea.env is injected into all init containers and the gitea container" - it: "deployment.gitea.env is injected into all init containers and the gitea container"
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.env: deployment.gitea.env:
- name: VARIABLE - name: VARIABLE
@@ -287,7 +287,7 @@ tests:
name: VARIABLE name: VARIABLE
value: my-value value: my-value
- it: CPU resources are defined as well as GOMAXPROCS - it: CPU resources are defined as well as GOMAXPROCS
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.resources: deployment.gitea.resources:
limits: limits:
@@ -315,7 +315,7 @@ tests:
cpu: 100ms cpu: 100ms
memory: 100Mi memory: 100Mi
- it: container resources default to an empty map and GOMAXPROCS is omitted - it: container resources default to an empty map and GOMAXPROCS is omitted
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- equal: - equal:
path: spec.template.spec.containers[0].resources path: spec.template.spec.containers[0].resources
@@ -329,12 +329,12 @@ tests:
divisor: "1" divisor: "1"
resource: limits.cpu resource: limits.cpu
- it: pod level resources are undefined - it: pod level resources are undefined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.resources path: spec.template.spec.resources
- it: pod level resources are defined - it: pod level resources are defined
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.resources: deployment.resources:
limits: limits:
@@ -354,7 +354,7 @@ tests:
cpu: 250m cpu: 250m
memory: 256Mi memory: 256Mi
- it: Init containers have correct volumeMount path - it: Init containers have correct volumeMount path
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
initContainersScriptsVolumeMountPath: "/custom/init/path" initContainersScriptsVolumeMountPath: "/custom/init/path"
asserts: asserts:
@@ -365,7 +365,7 @@ tests:
path: spec.template.spec.initContainers[*].volumeMounts[?(@.name=="config")].mountPath path: spec.template.spec.initContainers[*].volumeMounts[?(@.name=="config")].mountPath
value: "/custom/init/path" value: "/custom/init/path"
- it: Init containers have correct volumeMount path if there is no override - it: Init containers have correct volumeMount path if there is no override
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- equal: - equal:
path: spec.template.spec.initContainers[*].volumeMounts[?(@.name=="init")].mountPath path: spec.template.spec.initContainers[*].volumeMounts[?(@.name=="init")].mountPath
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: omits the checksum annotations by default - it: omits the checksum annotations by default
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.admin.enabled: true secrets.admin.enabled: true
secrets.config.enabled: true secrets.config.enabled: true
@@ -38,7 +38,7 @@ tests:
path: spec.template.metadata.annotations["checksum/metrics"] path: spec.template.metadata.annotations["checksum/metrics"]
- it: adds a checksum annotation for every Secret when addSHASumAnnotation is enabled - it: adds a checksum annotation for every Secret when addSHASumAnnotation is enabled
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.admin.addSHASumAnnotation: true secrets.admin.addSHASumAnnotation: true
secrets.admin.enabled: true secrets.admin.enabled: true
@@ -75,7 +75,7 @@ tests:
path: spec.template.metadata.annotations["checksum/metrics"] path: spec.template.metadata.annotations["checksum/metrics"]
- it: omits the checksum annotation of a single disabled Secret only - it: omits the checksum annotation of a single disabled Secret only
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.admin.addSHASumAnnotation: false secrets.admin.addSHASumAnnotation: false
secrets.admin.enabled: true secrets.admin.enabled: true
@@ -112,7 +112,7 @@ tests:
path: spec.template.metadata.annotations["checksum/metrics"] path: spec.template.metadata.annotations["checksum/metrics"]
- it: adds the checksum of Secrets provided by the user - it: adds the checksum of Secrets provided by the user
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.admin.enabled: true secrets.admin.enabled: true
secrets.admin.addSHASumAnnotation: true secrets.admin.addSHASumAnnotation: true
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: Renders a deployment - it: Renders a deployment
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 1 count: 1
@@ -21,7 +21,7 @@ tests:
apiVersion: apps/v1 apiVersion: apps/v1
name: gitea-unittests name: gitea-unittests
- it: Deployment with empty additionalConfigFromEnvs - it: Deployment with empty additionalConfigFromEnvs
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea.additionalConfigFromEnvs: [] gitea.additionalConfigFromEnvs: []
asserts: asserts:
@@ -49,7 +49,7 @@ tests:
- name: ENV_TO_INI_MOUNT_POINT - name: ENV_TO_INI_MOUNT_POINT
value: /env-to-ini-mounts value: /env-to-ini-mounts
- it: Deployment with standard additionalConfigFromEnvs - it: Deployment with standard additionalConfigFromEnvs
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea.additionalConfigFromEnvs: [{name: GITEA_database_HOST, value: my-db:123}, {name: GITEA_database_USER, value: my-user}] gitea.additionalConfigFromEnvs: [{name: GITEA_database_HOST, value: my-db:123}, {name: GITEA_database_USER, value: my-user}]
asserts: asserts:
@@ -81,7 +81,7 @@ tests:
- name: GITEA_database_USER - name: GITEA_database_USER
value: my-user value: my-user
- it: Deployment with templated additionalConfigFromEnvs - it: Deployment with templated additionalConfigFromEnvs
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea.misc.host: my-db-host:321 gitea.misc.host: my-db-host:321
gitea.misc.user: my-db-user gitea.misc.user: my-db-user
@@ -115,7 +115,7 @@ tests:
- name: GITEA_database_USER - name: GITEA_database_USER
value: my-db-user value: my-db-user
- it: Deployment with additionalConfigFromEnvs templated secret name - it: Deployment with additionalConfigFromEnvs templated secret name
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea.misc.existingSecret: my-db-secret gitea.misc.existingSecret: my-db-secret
gitea.additionalConfigFromEnvs[0]: gitea.additionalConfigFromEnvs[0]:
+1 -1
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deprecation.yaml - templates/deprecation.yaml
tests: tests:
- it: renders nothing with the default values - it: renders nothing with the default values
asserts: asserts:
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: uses direct execution when extraEnvSourceFile is not set - it: uses direct execution when extraEnvSourceFile is not set
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- equal: - equal:
path: spec.template.spec.initContainers[1].command path: spec.template.spec.initContainers[1].command
@@ -26,7 +26,7 @@ tests:
path: spec.template.spec.initContainers[2].args path: spec.template.spec.initContainers[2].args
- it: sources env file in init-app-ini when extraEnvSourceFile is set - it: sources env file in init-app-ini when extraEnvSourceFile is set
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea: gitea:
extraEnvSourceFile: /vault/secrets/gitea extraEnvSourceFile: /vault/secrets/gitea
@@ -42,7 +42,7 @@ tests:
pattern: config_environment\.sh pattern: config_environment\.sh
- it: sources env file in configure-gitea when extraEnvSourceFile is set - it: sources env file in configure-gitea when extraEnvSourceFile is set
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea: gitea:
extraEnvSourceFile: /vault/secrets/gitea extraEnvSourceFile: /vault/secrets/gitea
@@ -58,7 +58,7 @@ tests:
pattern: configure_gitea\.sh pattern: configure_gitea\.sh
- it: sources env file in configure-gpg when extraEnvSourceFile is set with signing enabled - it: sources env file in configure-gpg when extraEnvSourceFile is set with signing enabled
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.gpg.enabled: true secrets.gpg.enabled: true
secrets.gpg.existingSecret.enabled: true secrets.gpg.existingSecret.enabled: true
@@ -77,7 +77,7 @@ tests:
pattern: configure_gpg_environment\.sh pattern: configure_gpg_environment\.sh
- it: includes file existence check in source command - it: includes file existence check in source command
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea: gitea:
extraEnvSourceFile: /vault/secrets/gitea extraEnvSourceFile: /vault/secrets/gitea
@@ -3,23 +3,23 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: Render the deployment (default) - it: Render the deployment (default)
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 1 count: 1
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
- lengthEqual: - lengthEqual:
path: spec.template.spec.initContainers path: spec.template.spec.initContainers
count: 3 count: 3
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
- it: Render the deployment (signing) - it: Render the deployment (signing)
set: set:
@@ -29,11 +29,11 @@ tests:
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 1 count: 1
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
- lengthEqual: - lengthEqual:
path: spec.template.spec.initContainers path: spec.template.spec.initContainers
count: 4 count: 4
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
- it: Render the deployment (extraInitContainers) - it: Render the deployment (extraInitContainers)
set: set:
@@ -54,22 +54,22 @@ tests:
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 1 count: 1
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
- lengthEqual: - lengthEqual:
path: spec.template.spec.initContainers path: spec.template.spec.initContainers
count: 6 count: 6
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
- equal: - equal:
path: spec.template.spec.initContainers[0].name path: spec.template.spec.initContainers[0].name
value: bar value: bar
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
- equal: - equal:
path: spec.template.spec.initContainers[5].name path: spec.template.spec.initContainers[5].name
value: foo value: foo
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
- it: renders the chart-managed init containers in the configured order - it: renders the chart-managed init containers in the configured order
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.initContainers: deployment.initContainers:
- link: "initConfigureGitea" - link: "initConfigureGitea"
@@ -83,7 +83,7 @@ tests:
value: init-directories value: init-directories
- it: fails when an init container entry sets both container and link - it: fails when an init container entry sets both container and link
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.initContainers: deployment.initContainers:
- link: "initDirectories" - link: "initDirectories"
@@ -95,7 +95,7 @@ tests:
errorMessage: "deployment.initContainers[0]: `container` and `link` are mutually exclusive" errorMessage: "deployment.initContainers[0]: `container` and `link` are mutually exclusive"
- it: fails when an init container entry sets neither container nor link - it: fails when an init container entry sets neither container nor link
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.initContainers: deployment.initContainers:
- name: foo - name: foo
@@ -104,7 +104,7 @@ tests:
errorMessage: "deployment.initContainers[0]: either `container` or `link` must be set" errorMessage: "deployment.initContainers[0]: either `container` or `link` must be set"
- it: fails when an init container links to an unknown configuration - it: fails when an init container links to an unknown configuration
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.initContainers: deployment.initContainers:
- link: "initSomething" - link: "initSomething"
@@ -6,22 +6,22 @@ chart:
# Override appVersion to be consistent with used digest :) # Override appVersion to be consistent with used digest :)
appVersion: 1.19.3 appVersion: 1.19.3
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: default values - it: default values
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- equal: - equal:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.3-rootless" value: "docker.gitea.com/gitea:1.19.3-rootless"
- it: tag override - it: tag override
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.image.tag: "1.19.4" deployment.gitea.image.tag: "1.19.4"
asserts: asserts:
@@ -29,7 +29,7 @@ tests:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.4-rootless" value: "docker.gitea.com/gitea:1.19.4-rootless"
- it: root-based image - it: root-based image
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.image.rootless: false deployment.gitea.image.rootless: false
asserts: asserts:
@@ -37,7 +37,7 @@ tests:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.3" value: "docker.gitea.com/gitea:1.19.3"
- it: scoped registry - it: scoped registry
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.image.registry: "example.com" deployment.gitea.image.registry: "example.com"
asserts: asserts:
@@ -45,7 +45,7 @@ tests:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: "example.com/gitea:1.19.3-rootless" value: "example.com/gitea:1.19.3-rootless"
- it: global registry - it: global registry
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
global.imageRegistry: "global.example.com" global.imageRegistry: "global.example.com"
asserts: asserts:
@@ -53,7 +53,7 @@ tests:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: "global.example.com/gitea:1.19.3-rootless" value: "global.example.com/gitea:1.19.3-rootless"
- it: digest for rootless image - it: digest for rootless image
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment: deployment:
gitea: gitea:
@@ -65,7 +65,7 @@ tests:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" value: "docker.gitea.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
- it: image fullOverride (does not append rootless) - it: image fullOverride (does not append rootless)
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment: deployment:
gitea: gitea:
@@ -82,7 +82,7 @@ tests:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.3" value: "docker.gitea.com/gitea:1.19.3"
- it: digest for root-based image - it: digest for root-based image
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment: deployment:
gitea: gitea:
@@ -94,7 +94,7 @@ tests:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.3@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" value: "docker.gitea.com/gitea:1.19.3@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
- it: digest and global registry - it: digest and global registry
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
global.imageRegistry: "global.example.com" global.imageRegistry: "global.example.com"
deployment.gitea.image.digest: "sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" deployment.gitea.image.digest: "sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
@@ -103,7 +103,7 @@ tests:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: "global.example.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a" value: "global.example.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
- it: correctly renders floating tag references - it: correctly renders floating tag references
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
# use non-quoted values on purpose. See: https://gitea.com/gitea/helm-gitea/issues/631 # use non-quoted values on purpose. See: https://gitea.com/gitea/helm-gitea/issues/631
deployment.gitea.image.tag: 1.21 deployment.gitea.image.tag: 1.21
@@ -124,7 +124,7 @@ tests:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.21-rootless" value: "docker.gitea.com/gitea:1.21-rootless"
- it: init containers use their own image configuration - it: init containers use their own image configuration
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.initDirectories.image.registry: "init.example.com" deployment.initDirectories.image.registry: "init.example.com"
deployment.initDirectories.image.tag: "1.19.4" deployment.initDirectories.image.tag: "1.19.4"
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: appends the per-container env - it: appends the per-container env
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.initDirectories.env: deployment.initDirectories.env:
- name: INIT_DIRECTORIES - name: INIT_DIRECTORIES
@@ -38,7 +38,7 @@ tests:
value: "1" value: "1"
- it: renders the per-container envFrom - it: renders the per-container envFrom
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.initAppIni.envFrom: deployment.initAppIni.envFrom:
- secretRef: - secretRef:
@@ -53,7 +53,7 @@ tests:
name: special-secret name: special-secret
- it: appends the per-container volumeMounts - it: appends the per-container volumeMounts
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.initConfigureGitea.volumeMounts: deployment.initConfigureGitea.volumeMounts:
- name: my-configmap-volume - name: my-configmap-volume
@@ -74,7 +74,7 @@ tests:
readOnly: true readOnly: true
- it: overrides the resources of a single init container - it: overrides the resources of a single init container
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.initDirectories.resources: deployment.initDirectories.resources:
requests: requests:
@@ -94,7 +94,7 @@ tests:
memory: 128Mi memory: 128Mi
- it: overrides the security context of a single init container - it: overrides the security context of a single init container
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.securityContext: deployment.gitea.securityContext:
runAsUser: 1000 runAsUser: 1000
@@ -109,7 +109,7 @@ tests:
value: 1000 value: 1000
- it: renders the envFrom of the gitea container - it: renders the envFrom of the gitea container
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.envFrom: deployment.gitea.envFrom:
- configMapRef: - configMapRef:
@@ -122,7 +122,7 @@ tests:
name: special-config name: special-config
- it: omits envFrom when unset - it: omits envFrom when unset
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.containers[0].envFrom path: spec.template.spec.containers[0].envFrom
+1 -1
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
tests: tests:
- it: inline config stringData.server using TPL - it: inline config stringData.server using TPL
set: set:
+11 -11
View File
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: renders openshift-compatible defaults for chart-managed containers - it: renders openshift-compatible defaults for chart-managed containers
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
openshift.enabled: true openshift.enabled: true
asserts: asserts:
@@ -62,7 +62,7 @@ tests:
type: RuntimeDefault type: RuntimeDefault
- it: does not force runAsUser 1000 for command init containers on OpenShift - it: does not force runAsUser 1000 for command init containers on OpenShift
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
openshift.enabled: true openshift.enabled: true
secrets.gpg.enabled: true secrets.gpg.enabled: true
@@ -75,7 +75,7 @@ tests:
path: spec.template.spec.initContainers[3].securityContext.runAsUser path: spec.template.spec.initContainers[3].securityContext.runAsUser
- it: preserves explicit pod and container security context overrides on OpenShift - it: preserves explicit pod and container security context overrides on OpenShift
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
openshift: openshift:
enabled: true enabled: true
@@ -103,7 +103,7 @@ tests:
value: 1000620000 value: 1000620000
- it: renders an explicit hostUsers=false override on OpenShift - it: renders an explicit hostUsers=false override on OpenShift
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
openshift: openshift:
enabled: true enabled: true
+17 -17
View File
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: renders default liveness probe - it: renders default liveness probe
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.containers[0].livenessProbe.enabled path: spec.template.spec.containers[0].livenessProbe.enabled
@@ -27,7 +27,7 @@ tests:
port: http port: http
timeoutSeconds: 1 timeoutSeconds: 1
- it: renders default readiness probe - it: renders default readiness probe
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.containers[0].readinessProbe.enabled path: spec.template.spec.containers[0].readinessProbe.enabled
@@ -42,12 +42,12 @@ tests:
port: http port: http
timeoutSeconds: 1 timeoutSeconds: 1
- it: does not render a default startup probe - it: does not render a default startup probe
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notExists: - notExists:
path: spec.template.spec.containers[0].startupProbe path: spec.template.spec.containers[0].startupProbe
- it: allows enabling a startup probe - it: allows enabling a startup probe
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea.startupProbe.enabled: true gitea.startupProbe.enabled: true
asserts: asserts:
@@ -65,7 +65,7 @@ tests:
timeoutSeconds: 1 timeoutSeconds: 1
- it: allows overwriting the default port of the liveness probe - it: allows overwriting the default port of the liveness probe
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea: gitea:
livenessProbe: livenessProbe:
@@ -79,7 +79,7 @@ tests:
port: my-port port: my-port
- it: allows overwriting the default port of the readiness probe - it: allows overwriting the default port of the readiness probe
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea: gitea:
readinessProbe: readinessProbe:
@@ -93,7 +93,7 @@ tests:
port: my-port port: my-port
- it: allows overwriting the default port of the startup probe - it: allows overwriting the default port of the startup probe
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea: gitea:
startupProbe: startupProbe:
@@ -108,7 +108,7 @@ tests:
port: my-port port: my-port
- it: allows using a non-default method as liveness probe - it: allows using a non-default method as liveness probe
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea: gitea:
livenessProbe: livenessProbe:
@@ -136,7 +136,7 @@ tests:
timeoutSeconds: 13372 timeoutSeconds: 13372
- it: allows using a non-default method as readiness probe - it: allows using a non-default method as readiness probe
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea: gitea:
readinessProbe: readinessProbe:
@@ -164,7 +164,7 @@ tests:
timeoutSeconds: 13372 timeoutSeconds: 13372
- it: allows using a non-default method as startup probe - it: allows using a non-default method as startup probe
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
gitea: gitea:
startupProbe: startupProbe:
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: supports adding a sidecar container - it: supports adding a sidecar container
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
extraContainers: extraContainers:
- name: sidecar-bob - name: sidecar-bob
+11 -11
View File
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: skips gpg init container - it: skips gpg init container
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notContains: - notContains:
path: spec.template.spec.initContainers path: spec.template.spec.initContainers
@@ -20,7 +20,7 @@ tests:
content: content:
name: configure-gpg name: configure-gpg
- it: skips gpg env in `init-directories` init container - it: skips gpg env in `init-directories` init container
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.gpg.enabled: false secrets.gpg.enabled: false
asserts: asserts:
@@ -29,14 +29,14 @@ tests:
content: content:
name: GNUPGHOME name: GNUPGHOME
- it: skips gpg env in runtime container - it: skips gpg env in runtime container
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notContains: - notContains:
path: spec.template.spec.containers[0].env path: spec.template.spec.containers[0].env
content: content:
name: GNUPGHOME name: GNUPGHOME
- it: skips gpg volume spec - it: skips gpg volume spec
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
asserts: asserts:
- notContains: - notContains:
path: spec.template.spec.volumes path: spec.template.spec.volumes
+13 -13
View File
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: adds gpg init container - it: adds gpg init container
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.gpg.enabled: true secrets.gpg.enabled: true
secrets.gpg.existingSecret.enabled: true secrets.gpg.existingSecret.enabled: true
@@ -49,7 +49,7 @@ tests:
mountPath: /raw mountPath: /raw
readOnly: true readOnly: true
- it: adds gpg env in `init-directories` init container - it: adds gpg env in `init-directories` init container
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.gpg.enabled: true secrets.gpg.enabled: true
secrets.gpg.existingSecret.enabled: true secrets.gpg.existingSecret.enabled: true
@@ -64,7 +64,7 @@ tests:
name: custom-gpg-secret name: custom-gpg-secret
key: gpgHome key: gpgHome
- it: adds gpg env in runtime container - it: adds gpg env in runtime container
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.gpg.enabled: true secrets.gpg.enabled: true
secrets.gpg.existingSecret.enabled: true secrets.gpg.existingSecret.enabled: true
@@ -79,7 +79,7 @@ tests:
name: custom-gpg-secret name: custom-gpg-secret
key: gpgHome key: gpgHome
- it: reads the gpg home from the configured key of an existing secret - it: reads the gpg home from the configured key of an existing secret
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.gpg.enabled: true secrets.gpg.enabled: true
secrets.gpg.existingSecret.enabled: true secrets.gpg.existingSecret.enabled: true
@@ -95,7 +95,7 @@ tests:
name: custom-gpg-secret name: custom-gpg-secret
key: custom-gpg-home key: custom-gpg-home
- it: adds gpg volume spec - it: adds gpg volume spec
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.gpg.enabled: true secrets.gpg.enabled: true
secrets.gpg.new.privateKey: "gpg-key-placeholder" secrets.gpg.new.privateKey: "gpg-key-placeholder"
@@ -111,7 +111,7 @@ tests:
path: private.asc path: private.asc
defaultMode: 0100 defaultMode: 0100
- it: supports gpg volume spec with external reference - it: supports gpg volume spec with external reference
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
secrets.gpg.enabled: true secrets.gpg.enabled: true
secrets.gpg.existingSecret.enabled: true secrets.gpg.existingSecret.enabled: true
@@ -3,16 +3,16 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/deployment.yaml - templates/deployment.yaml
- templates/gitea/secret_admin.yaml - templates/secret_admin.yaml
- templates/gitea/secret_config.yaml - templates/secret_config.yaml
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
- templates/gitea/secret_inlineConfig.yaml - templates/secret_inlineConfig.yaml
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: supports defining SSH log level for root based image - it: supports defining SSH log level for root based image
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.image.rootless: false deployment.gitea.image.rootless: false
asserts: asserts:
@@ -22,7 +22,7 @@ tests:
name: SSH_LOG_LEVEL name: SSH_LOG_LEVEL
value: "INFO" value: "INFO"
- it: supports overriding SSH log level - it: supports overriding SSH log level
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.image.rootless: false deployment.gitea.image.rootless: false
gitea.ssh.logLevel: "DEBUG" gitea.ssh.logLevel: "DEBUG"
@@ -33,7 +33,7 @@ tests:
name: SSH_LOG_LEVEL name: SSH_LOG_LEVEL
value: "DEBUG" value: "DEBUG"
- it: supports overriding SSH log level (even when image.fullOverride set) - it: supports overriding SSH log level (even when image.fullOverride set)
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3 deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
deployment.gitea.image.rootless: false deployment.gitea.image.rootless: false
@@ -45,7 +45,7 @@ tests:
name: SSH_LOG_LEVEL name: SSH_LOG_LEVEL
value: "DEBUG" value: "DEBUG"
- it: skips SSH_LOG_LEVEL for rootless image - it: skips SSH_LOG_LEVEL for rootless image
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.image.rootless: true deployment.gitea.image.rootless: true
gitea.ssh.logLevel: "DEBUG" # explicitly defining a non-standard level here gitea.ssh.logLevel: "DEBUG" # explicitly defining a non-standard level here
@@ -56,7 +56,7 @@ tests:
content: content:
name: SSH_LOG_LEVEL name: SSH_LOG_LEVEL
- it: skips SSH_LOG_LEVEL for rootless image (even when image.fullOverride set) - it: skips SSH_LOG_LEVEL for rootless image (even when image.fullOverride set)
template: templates/gitea/deployment.yaml template: templates/deployment.yaml
set: set:
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3 deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
deployment.gitea.image.rootless: true deployment.gitea.image.rootless: true
@@ -5,7 +5,7 @@ release:
namespace: testing namespace: testing
suite: Storage class configuration tests suite: Storage class configuration tests
templates: templates:
- templates/gitea/persistentVolumeClaim.yaml - templates/persistentVolumeClaim.yaml
tests: tests:
- it: Set storageClassName when persistence.new.storageClassName is defined - it: Set storageClassName when persistence.new.storageClassName is defined
set: set:
@@ -3,11 +3,11 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/service_ssh.yaml - templates/service_ssh.yaml
- templates/gitea/service_http.yaml - templates/service_http.yaml
tests: tests:
- it: supports adding custom labels to sshService - it: supports adding custom labels to sshService
template: templates/gitea/service_ssh.yaml template: templates/service_ssh.yaml
set: set:
service: service:
ssh: ssh:
@@ -19,7 +19,7 @@ tests:
value: "testvalue" value: "testvalue"
- it: keeps existing labels (ssh) - it: keeps existing labels (ssh)
template: templates/gitea/service_ssh.yaml template: templates/service_ssh.yaml
set: set:
service: service:
ssh: ssh:
@@ -29,7 +29,7 @@ tests:
path: metadata.labels["app"] path: metadata.labels["app"]
- it: supports adding custom labels to httpService - it: supports adding custom labels to httpService
template: templates/gitea/service_http.yaml template: templates/service_http.yaml
set: set:
service: service:
http: http:
@@ -41,7 +41,7 @@ tests:
value: "testvalue" value: "testvalue"
- it: keeps existing labels (http) - it: keeps existing labels (http)
template: templates/gitea/service_http.yaml template: templates/service_http.yaml
set: set:
service: service:
http: http:
@@ -51,7 +51,7 @@ tests:
path: metadata.labels["app"] path: metadata.labels["app"]
- it: render service.ssh.loadBalancerClass if set and type is LoadBalancer - it: render service.ssh.loadBalancerClass if set and type is LoadBalancer
template: templates/gitea/service_ssh.yaml template: templates/service_ssh.yaml
set: set:
service: service:
ssh: ssh:
@@ -73,7 +73,7 @@ tests:
value: ["1.2.3.4/32", "5.6.7.8/32"] value: ["1.2.3.4/32", "5.6.7.8/32"]
- it: does not render when loadbalancer properties are set but type is not loadBalancerClass - it: does not render when loadbalancer properties are set but type is not loadBalancerClass
template: templates/gitea/service_http.yaml template: templates/service_http.yaml
set: set:
service: service:
http: http:
@@ -92,7 +92,7 @@ tests:
path: spec.loadBalancerSourceRanges path: spec.loadBalancerSourceRanges
- it: does not render loadBalancerClass by default even when type is LoadBalancer - it: does not render loadBalancerClass by default even when type is LoadBalancer
template: templates/gitea/service_http.yaml template: templates/service_http.yaml
set: set:
service: service:
http: http:
@@ -107,8 +107,8 @@ tests:
- it: both ssh and http services exist - it: both ssh and http services exist
templates: templates:
- templates/gitea/service_ssh.yaml - templates/service_ssh.yaml
- templates/gitea/service_http.yaml - templates/service_http.yaml
asserts: asserts:
- matchRegex: - matchRegex:
path: metadata.name path: metadata.name
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/backendTLSPolicy.yaml - templates/backendTLSPolicy.yaml
tests: tests:
- it: should not render when gatewayAPI.enabled is false - it: should not render when gatewayAPI.enabled is false
set: set:
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/clientSettingsPolicy.yaml - templates/clientSettingsPolicy.yaml
tests: tests:
- it: should not render when gatewayAPI.enabled is false - it: should not render when gatewayAPI.enabled is false
set: set:
+1 -1
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/httpRoute.yaml - templates/httpRoute.yaml
tests: tests:
- it: should not render when gatewayAPI.enabled is false - it: should not render when gatewayAPI.enabled is false
set: set:
+1 -1
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/tcpRoute.yaml - templates/tcpRoute.yaml
tests: tests:
- it: should not render when gatewayAPI.enabled is false - it: should not render when gatewayAPI.enabled is false
set: set:
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
tests: tests:
- it: renders nothing - it: renders nothing
set: set:
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_gpg.yaml - templates/secret_gpg.yaml
tests: tests:
- it: fails rendering when nothing is configured - it: fails rendering when nothing is configured
set: set:
+1 -1
View File
@@ -5,7 +5,7 @@ release:
namespace: testing namespace: testing
suite: Test ingress.yaml suite: Test ingress.yaml
templates: templates:
- templates/gitea/ingress.yaml - templates/ingress.yaml
tests: tests:
- it: Skip ingress if ingress is disabled - it: Skip ingress if ingress is disabled
set: set:
+1 -1
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
tests: tests:
- it: renders a secret - it: renders a secret
asserts: asserts:
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
tests: tests:
- it: runs gpg in batch mode - it: runs gpg in batch mode
set: set:
@@ -63,7 +63,7 @@ tests:
chown -v 1000:1000 "${GNUPGHOME}" chown -v 1000:1000 "${GNUPGHOME}"
fi fi
- it: it does not chown /data even when image.fullOverride is set - it: it does not chown /data even when image.fullOverride is set
template: templates/gitea/secret_init.yaml template: templates/secret_init.yaml
set: set:
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.20.5 deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.20.5
asserts: asserts:
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_init.yaml - templates/secret_init.yaml
tests: tests:
- it: runs gpg in batch mode - it: runs gpg in batch mode
set: set:
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: renders nothing if monitoring disabled and gitea.metrics.token empty - it: renders nothing if monitoring disabled and gitea.metrics.token empty
set: set:
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/secret_metrics.yaml - templates/secret_metrics.yaml
tests: tests:
- it: renders nothing if monitoring enabled and gitea.metrics.token empty - it: renders nothing if monitoring enabled and gitea.metrics.token empty
set: set:
@@ -5,7 +5,7 @@ release:
namespace: testing namespace: testing
suite: PVC template suite: PVC template
templates: templates:
- templates/gitea/persistentVolumeClaim.yaml - templates/persistentVolumeClaim.yaml
tests: tests:
- it: Skip persistentVolumeClaim if persistentVolumeClaim is disabled - it: Skip persistentVolumeClaim if persistentVolumeClaim is disabled
set: set:
+1 -1
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/route.yaml - templates/route.yaml
tests: tests:
- it: should create route when route.enabled is true - it: should create route when route.enabled is true
set: set:
@@ -5,7 +5,7 @@ release:
namespace: testing namespace: testing
suite: ServiceAccount template suite: ServiceAccount template
templates: templates:
- templates/gitea/serviceAccount.yaml - templates/serviceAccount.yaml
tests: tests:
- it: Render the ServiceAccount by default - it: Render the ServiceAccount by default
asserts: asserts:
+1 -1
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/serviceMonitor.yaml - templates/serviceMonitor.yaml
tests: tests:
- it: skips rendering by default - it: skips rendering by default
asserts: asserts:
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/serviceMonitor.yaml - templates/serviceMonitor.yaml
tests: tests:
- it: renders nothing if gitea.metrics.serviceMonitor disabled and gitea.metrics.token empty - it: renders nothing if gitea.metrics.serviceMonitor disabled and gitea.metrics.token empty
set: set:
@@ -3,7 +3,7 @@ release:
name: gitea-unittests name: gitea-unittests
namespace: testing namespace: testing
templates: templates:
- templates/gitea/serviceMonitor.yaml - templates/serviceMonitor.yaml
tests: tests:
- it: renders unsecure ServiceMonitor if gitea.metrics.token nil - it: renders unsecure ServiceMonitor if gitea.metrics.token nil
set: set: