oncall-engine/helm/oncall/tests/image_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

33 lines
910 B
YAML

suite: test image and imagePullPolicy for deployments
templates:
- celery/deployment-celery.yaml
- engine/deployment.yaml
- engine/job-migrate.yaml
release:
name: oncall
chart:
appVersion: 1.2.36
tests:
- it: image={} -> should use default image tag
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: grafana/oncall:1.2.36
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: Always
- it: image.repository and image.tag -> should use custom image
set:
image:
repository: custom-oncall
tag: 1.2.36-custom
pullPolicy: IfNotPresent
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: custom-oncall:1.2.36-custom
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: IfNotPresent