# 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>
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
suite: test telegram envs for deployments
|
|
templates:
|
|
- engine/deployment.yaml
|
|
- celery/deployment-celery.yaml
|
|
release:
|
|
name: oncall
|
|
tests:
|
|
- it: oncall.telegram.enabled=false -> Telegram integration disabled (default)
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: FEATURE_TELEGRAM_INTEGRATION_ENABLED
|
|
value: "False"
|
|
|
|
- it: oncall.telegram.enabled=true -> should enable Telegram integration
|
|
set:
|
|
oncall.telegram:
|
|
enabled: true
|
|
webhookUrl: https://example.com
|
|
token: "abcd:123"
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: FEATURE_TELEGRAM_INTEGRATION_ENABLED
|
|
value: "True"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: TELEGRAM_WEBHOOK_HOST
|
|
value: "https://example.com"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: TELEGRAM_TOKEN
|
|
value: "abcd:123"
|
|
|
|
- it: oncall.telegram.existingSecret=some-secret -> should prefer existing secret over oncall.telegram.token
|
|
set:
|
|
oncall.telegram:
|
|
enabled: true
|
|
token: "abcd:123"
|
|
existingSecret: some-secret
|
|
tokenKey: token
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: TELEGRAM_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: some-secret
|
|
key: token
|
|
|