mirror-forgejo-helm/unittests/deployment/basic.yaml
Dalton Russell d307773ff1
Add deployment labels to deployment (#649)
Applies `deployment.labels` to the deployment itself.

Allows the user to add labels to the deployment.

None

- [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] Templating unittests are added

Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/649
Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.com>
Co-authored-by: Dalton Russell <dalton.russell@tangramflex.com>
Co-committed-by: Dalton Russell <dalton.russell@tangramflex.com>
(cherry picked from commit dd304c1c1ac3726924d7311a688cd68c6883ffaa)

Conflicts:
 unittests/deployment/basic.yaml
2024-05-27 09:25:22 +02:00

31 lines
773 B
YAML

suite: deployment template (basic)
release:
name: forgejo-unittests
namespace: testing
templates:
- templates/gitea/deployment.yaml
- templates/gitea/config.yaml
tests:
- it: renders a deployment
template: templates/gitea/deployment.yaml
asserts:
- hasDocuments:
count: 1
- containsDocument:
kind: Deployment
apiVersion: apps/v1
name: forgejo-unittests
- it: deployment labels are set
template: templates/gitea/deployment.yaml
set:
deployment.labels:
hello: world
asserts:
- isSubset:
path: metadata.labels
content:
hello: world
- isSubset:
path: spec.template.metadata.labels
content:
hello: world