oncall-engine/helm/oncall/tests/service_account_deployments_test.yaml
Alexander Cherepanov d3247447ef
Fix usage of extra envs as map in Helm chart (#2146)
# What this PR does


1. Fixes setting extra envs using:
```yaml
env:
  proxy: http://example.com
  SOME_VAR: some-value
```
It had failed if postgresql setting enabled and in `job-migrate`

2. Fixes an issue if custom database and username set for internal
mariadb, `MYSQL_` envs did not use them
```yaml
mariadb:
  auth:
     database: grafana_oncall
     username: grafana_oncall
```

3. Added `imagePullSecrets: []` to values.yaml. It used in helm chart,
but does not present in the values.yaml
4. More unit tests

## Which issue(s) this PR fixes

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
2023-06-12 03:34:36 +00:00

30 lines
862 B
YAML

suite: test service account deployments
templates:
- celery/deployment-celery.yaml
- engine/deployment.yaml
- engine/job-migrate.yaml
release:
name: oncall
tests:
- it: serviceAccount.create=true -> should use created serviceAccount for deployments (default)
asserts:
- equal:
path: spec.template.spec.serviceAccountName
value: oncall
- it: serviceAccount.create=false -> should use default serviceAccount for deployments
set:
serviceAccount.create: false
asserts:
- equal:
path: spec.template.spec.serviceAccountName
value: default
- it: serviceAccount.name=custom -> should use created custom serviceAccount for deployments
set:
serviceAccount.name: custom
asserts:
- equal:
path: spec.template.spec.serviceAccountName
value: custom