dd304c1c1a
### Description of the change Applies `deployment.labels` to the deployment itself. ### Benefits Allows the user to add labels to the deployment. ### Possible drawbacks None ### 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] 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>
32 lines
769 B
YAML
32 lines
769 B
YAML
suite: deployment template (basic)
|
|
release:
|
|
name: gitea-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: gitea-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
|