Commit graph

45 commits

Author SHA1 Message Date
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
Ildar Iskhakov
1a6e30c249
Upgrade helm dependecies, improve local setup (#2144)
# What this PR does
* Upgrade to the recent Grafana
* Upgrade to the recent bitnami mariadb, rabbitmq charts which support
arm64 now
* Remove deprecated psp policies from grafana chart
* Make startupProbe period smaller to increase installation speed 


## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-09 15:16:51 +08:00
pikilisaikiran
a0da31f745
Added nodeSelector for celery deployment and migrate job (#1085)
# What this PR does
Adds nodeSelector for celery deployment and migrate job

## Which issue(s) this PR fixes
Fixes errors while deploying resources in a cluster with Gatekeeper
policy ( that restricts deployments without nodeSelector).

## Checklist

- [x] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-06-08 20:53:11 +00:00
Alexander Cherepanov
8049b5075d
Helm chart: added configuration of uwsgi using environment variables (#2045)
# What this PR does

Adds `uwsgi` configuration to helm chart.
Sets environment variables with name capitalized and prefixed with
`UWSGI_`, and dashes are substituted with underscores like described
[here](https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#environment-variables)

Sets `UWSGI_LISTEN=1024` by default, but can be overwritten or
completely removed by `uwsgi: null`

Or is it better to not specify default value (it's not backward
compatible)?

Also, small indentation fixes for postgresql configuration.

## Which issue(s) this PR fixes

closes https://github.com/grafana/oncall/issues/562

Also, [this PR](https://github.com/grafana/oncall/pull/856) has been
closed because of this PR

## 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: Joey Orlando <joey.orlando@grafana.com>
2023-05-29 17:35:43 +00:00
Alexander Cherepanov
9e65f6bf14
Fix bugs in helm chart with external postgresql configuration (#2036)
# What this PR does

Fixing some bugs with external Postgresql configuration.

Also I added some unit tests for helm chart using
[helm-unittest](https://github.com/helm-unittest/helm-unittest). If it's
not an appropriate tool, please suggest another, or I can remove that
test. I added
[this](https://github.com/marketplace/actions/helm-unit-tests) Github
Action to run helm unit tests.


## Which issue(s) this PR fixes
closes #1727 
closes #1923
closes #1245
closes #845 

## Checklist

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

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2023-05-26 13:50:24 +00:00
atownsend247
18fe390d44
Extend twilio secrets (#1435)
# What this PR does

This allows the use of existing secrets for the twilio configuration,
much like slack already does, as have used that to influence these
changes

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
2023-04-21 17:21:06 +03:00
Matthias Teich
0c42c2a86d
Add option to use helm hook for migration job (#1386)
# What this PR does
This PR adds the option to use helm hooks for the database migration.

## Which issue(s) this PR fixes
Currently oncall always shows as out-of-sync in argo-cd because the name
changes on each hard refresh.
When using a helm hook the job is executed on sync but does not show as
out-of-sync

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
2023-04-17 10:22:05 +00:00
Tom Mitchell
ccbe8259c9
correct values file stub for slack commandName (#1093)
# What this PR does

The templates actually generate the SLACK_SLASH_COMMAND_NAME envvar from
`.Values.oncall.slack.commandName`, not `command`. This commit changes
the default values file to reflect this.

## Which issue(s) this PR fixes

#1092 

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated

^ Are these applicable with regards to updating the helm chart, not the
core application? I did take the time to test both the default and
changed value after this change in a kubernetes deployment.

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-01-12 08:03:33 +01:00
Juris Pavļučenkovs
327b7121ac
Helm: define engine update strategy in values.yaml (#985)
# What this PR does

Now it is possible to change engine deployment update strategy in
values.yaml.
## Which issue(s) this PR fixes

This is due to #334 and #316, as with rolling update, race conditions
might happen when there is still an old engine pod running.

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2022-12-20 13:59:19 +01:00
Erikas Truskauskas
c1307a44d7
Make job-migrate ttlSecondsAfterFinished customizable (#957)
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2022-12-07 09:10:10 +01:00
Joey Orlando
427dd4b5f7
helm chart v1.0.13 - update appVersion to v1.1.5 + change image.pullPolicy to "Always" (#937) 2022-12-02 13:27:37 +01:00
Yulya Artyukhina
381520ee13
Get rid of installation token + add a bunch of tests (#624)
* Get rid of installation token (for OSS installations)

This is done by being required to supply the grafana API URL as an
environment variable on the backend. Additionally, optionally an OnCall
API URL environment variable can be passed in to the frontend (this basically
allows completely skipping the need to configure anything).
- deduplicated a lot of the sync logic on the frontend + made
error message more useful and consistent
- Split PluginConfigPage component into several subcomponents
(making it easier to test each individual component)
- Moved RootWithLoader (from plugin/GrafanaPluginRootPage) into its own
subcomponent (making it easier to test)
- Added tests for pre-existing components that were touched:
  - PluginConfigPage component (and its new subcomponents)
  - state/plugin and state/rootBaseStore functions
  - apps.grafana_plugin django app

Helm changes:
- add GRAFANA_API_URL to oncall.env
- some yaml autoformatting changes
- remove reference to python manage.py issue_invite_for_the_frontend --override

Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2022-11-21 16:26:00 +01:00
Chinthiti Wisetsombat
cb551d4bd5
Helm chart: allow using existing secrets for oncall secrets, slack, and telegram (#718)
* chart: allow to use oncall env from existing secret

* chart: slack credentials from existing secret

* chart: telegram token from existing secret

* chart: fix mirage cipher IV length

* chart: restore mirage cipher IV default and remove it from secret

* chart: add keys for existing oncall secret

* chart: add keys for existing slack secret

* chart: add keys for existing telegram secret

* chart: change key existingSecretName to existingSecret

Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
2022-11-20 12:22:14 +08:00
Ildar Iskhakov
e7641b7539
Fix helm values.yaml, bump helm version (#792) 2022-11-08 17:10:26 +08:00
David van der Spek
c01068898a
Helm: allow for using existing secret for RabbitMQ (#761)
* init rabbitmq existing secret

Signed-off-by: David van der Spek <vanderspek.david@gmail.com>

* bump chart

Signed-off-by: David van der Spek <vanderspek.david@gmail.com>

Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
2022-11-03 15:31:00 +08:00
Ildar Iskhakov
ed5262f2f5
Add BROKER_TYPE env var to the helm chart (#697) 2022-11-02 17:37:41 +08:00
th30nlyw4y
f1af588552
Add ability to set more env vars via config & change env template & f… (#674)
* Add ability to set more env vars via config & change env template & fix env spacing

* Fix default redirectHost value

* Additional Twilio env vars + modified Twilio vars flow

* Fix wrong phoneNumber rendering

Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
2022-11-02 17:32:05 +08:00
David van der Spek
d3dfaebab7
Helm chart: add support for PostgreSQL (#661)
* add support for PostgreSQL

Signed-off-by: DavidSpek <vanderspek.david@gmail.com>

* disable postgres by default

Signed-off-by: DavidSpek <vanderspek.david@gmail.com>

* fix external postgres existing secret

Signed-off-by: DavidSpek <vanderspek.david@gmail.com>

* disable ingress annotations and tls by default

Signed-off-by: DavidSpek <vanderspek.david@gmail.com>

* fix exec command in notes

Signed-off-by: DavidSpek <vanderspek.david@gmail.com>

* Add review comments + cleanup README

Signed-off-by: DavidSpek <vanderspek.david@gmail.com>

Signed-off-by: DavidSpek <vanderspek.david@gmail.com>
2022-11-02 15:34:41 +08:00
Ildar Iskhakov
7cc01e0585
Merge pull request #670 from pluralsh/helm-smtp
Helm chart: add smtp settings to helm chart
2022-10-24 11:28:22 +08:00
DavidSpek
e8b34a895b fix missing env vars
Signed-off-by: DavidSpek <vanderspek.david@gmail.com>
2022-10-19 14:40:44 +02:00
DavidSpek
7ea9f3e7f8 add smtp settings to helm chart
Signed-off-by: DavidSpek <vanderspek.david@gmail.com>
2022-10-19 14:19:22 +02:00
Alf-Rune Siqveland
d48582d517
fix(helm): Update the Slack helm values and environment variables
The former helm values apiToken and apiTokenCommon were outdated/unused
by the application.

Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
2022-10-19 13:00:34 +02:00
Ildar Iskhakov
8f051177fe
Merge branch 'dev' into disable-autorestarts 2022-10-07 10:34:01 +08:00
Ildar Iskhakov
bf8f20a1fb Enable restarts by default 2022-10-07 10:32:57 +08:00
Ildar Iskhakov
50c960038d Allow disabling autorestarts 2022-10-07 10:30:45 +08:00
Juris Pavļučenkovs
f4d79e634a
enable celery liveness probe 2022-10-05 11:23:25 +03:00
Juris Pavļučenkovs
b6092f6d5c
fix helm celery healthcheck 2022-10-05 11:11:08 +03:00
Ildar Iskhakov
e32eecf6ff Fix code styling in helm chart 2022-10-04 16:48:33 +08:00
Ildar Iskhakov
3ad4f60d69
Merge pull request #344 from vsmanu/343-node-selection-in-helm
343: node selection for helm chart - engine only - Initial commit
2022-10-04 16:45:24 +08:00
George
dd6975858a
feat: setting env for slack and telegram from helm (#270) 2022-09-05 17:12:18 +03:00
Manu Vamadevan
b9b36b3393 343: node selection for helm chart - engine only - added blank line for seperation 2022-08-09 10:08:27 +02:00
Manu Vamadevan
9495ee9f14 343: node selection for helm chart - engine only - corrected config positioning 2022-08-08 23:25:00 +02:00
Manu Vamadevan
67465168b8 343: node selection for helm chart - engine only - Initial commit 2022-08-08 20:17:31 +02:00
Jack Wink
2be7bc7cb2
Allow chart user to add extra ingress paths
This supports adding paths to the oncall host so the ingress can be
configured to work with annotation-based ingress controllers (for
example, the ALB ingress controller).

By default no extra paths are added, and this change should be backwards
compatible.
2022-07-29 12:50:57 -07:00
Jack Wink
3f56b8ceac
Allow ingress TLS to be configured
This will let the ingress work with more than just the
nginx/cert-manager combination installed as part of the chart.

The default values render in a way that makes this backwards compatible,
so no major version change is required.
2022-07-29 12:38:25 -07:00
Max Golionko
8b92b03d42
enable annotations for external service 2022-07-19 13:34:17 +08:00
Georgy Poputnikov
0e35991ac8 feat: allow setting vhost for rabbitmq instance 2022-07-17 17:18:06 +03:00
Joshua Pare
0fd1a2146c allow rabbitmq protocol to be default amqp but configurable (for services like AmazonMQ which use amqps) 2022-06-29 09:02:19 -04:00
Ildar Iskhakov
7169b1b563
Merge pull request #102 from xom4ek/helm-changes
Helm changes for istio using and ingerss create without grafana
2022-06-28 10:50:23 +03:00
Ildar Iskhakov
05a5fc0096
Update values.yaml 2022-06-21 20:27:20 +03:00
Ildar Iskhakov
9195a60337
Merge pull request #99 from xom4ek/patch-1
Fix externalRedis for correct template
2022-06-21 13:28:42 +03:00
Alexandre Chaussier
c307bc56ce fix: fix ingress-nginx dependency management in values.yaml 2022-06-18 15:40:58 +02:00
Alexey Lazarev
14165fabed feat(helm): add security context for init container
for ex istio using 1337 for init containers
2022-06-16 17:52:29 +04:00
Aleksey
e646293885
Fix externalRedis for correct template
`externalRedis` in https://github.com/grafana/oncall/blob/dev/helm/oncall/templates/_env.tpl#L141 but here `external_redis`
2022-06-16 11:39:13 +04:00
Michael Derynck
4572131951
Merge dev to main (#73)
* Log (failed) attempt to notify a user with viewer role

* Remove old publishing workflow

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add publishing workflows for next (unreleased) and released documentation

Notable features:
- Merges are blocked by strict Hugo reference checking. However, this
only works for references that resolve within the repository. Once you
have Hugo references to website pages beyond this repository, you will
want to remove this test job.
- Pushes to main are automatically published to "next" documentation
consistent with our other OSS projects.
- Pushes of release tags publish to a versioned directory in the
website. The website uses `v<MAJOR>.<MINOR>.x` versioning and the
"Determine technical documentation version" step will make sure that a
tag such as `v0.20.7` is mapped to `v0.20.x`.
- Pushes to release branches will only be published if there is an
existing corresponding release tag. For example, pushing to a new
release branch `release-0.1000` will not trigger a publish of
documentation until there is a `v0.1000.0` release tag.

> **Note:** I have used a release branch naming convention
`release-<MAJOR>-<MINOR>` which is consistent with grafana/mimir but I
see that in the old amixr repository there are long lived release
branches for patch versions. If that is required. I can update this PR
to support that but I would recommend not including patch versions in
release branch naming unless you have a good reason to do so.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add helm chaart installation

* s/mimir/oncall/

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove https:// prefix from BASE_URL docker env var

* Fix cloud heartbeat name

* Polishing telegram

* Update docker-compose.yml

* Update plugin README  (#48)

* Update README and screenshot, remove plop for build info since version is now displayed prominently

* Sign build

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Build actions (#38)

* Drone, github action changes

* Minor version updates

* Update frontend dependencies

* Re-enable unit test

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Revert stylelint version (#52)

* Revert stylelint version

* Build plugin as well as lint

* Build in previous step

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Update screenshot (#53)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* oncall images for docs (#55)

* Fix chart

* Finalise helm chart

* Update README.md

* Top menu fix

* Fix db encoding

* Add api key docs

* Reverting utf8 fix

* bug fixes

* fix for link for OSS version

* Fixing utf8 and docker compose

* 8080 -> 8000 port for consistency

* Improve the helm chart

* makeReq

* Fixing images

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Add last moment improvements

* Fixing port

* Replace symlink with file for CHANGELOG.MD (#68)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Edit Chart.yaml

* Edit version

* Edit README.md

* Fixing port

* Update README.md

* Fix linting

* image: grafana/oncall

* Merge dev to main (#71)

* Merge dev to main (#54)

* Log (failed) attempt to notify a user with viewer role

* Remove https:// prefix from BASE_URL docker env var

* Fix cloud heartbeat name

* Polishing telegram

* Update docker-compose.yml

* Update plugin README  (#48)

* Update README and screenshot, remove plop for build info since version is now displayed prominently

* Sign build

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Build actions (#38)

* Drone, github action changes

* Minor version updates

* Update frontend dependencies

* Re-enable unit test

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Revert stylelint version (#52)

* Revert stylelint version

* Build plugin as well as lint

* Build in previous step

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Update screenshot (#53)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matvey Kukuy <matvey@amixr.io>
Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Merge dev to main (#69)

* Log (failed) attempt to notify a user with viewer role

* Remove https:// prefix from BASE_URL docker env var

* Fix cloud heartbeat name

* Polishing telegram

* Update docker-compose.yml

* Update plugin README  (#48)

* Update README and screenshot, remove plop for build info since version is now displayed prominently

* Sign build

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Build actions (#38)

* Drone, github action changes

* Minor version updates

* Update frontend dependencies

* Re-enable unit test

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Revert stylelint version (#52)

* Revert stylelint version

* Build plugin as well as lint

* Build in previous step

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Update screenshot (#53)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* oncall images for docs (#55)

* Update README.md

* Top menu fix

* Fix db encoding

* Add api key docs

* Reverting utf8 fix

* bug fixes

* fix for link for OSS version

* Fixing utf8 and docker compose

* 8080 -> 8000 port for consistency

* makeReq

* Fixing images

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Replace symlink with file for CHANGELOG.MD (#68)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matvey Kukuy <matvey@amixr.io>
Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>

Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Matvey Kukuy <matvey@amixr.io>
Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>

Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Ildar Iskhakov <ildar.iskhakov@grafana.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matvey Kukuy <matvey@amixr.io>
Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2022-06-14 09:54:41 -06:00