Skip to content

Commit

Permalink
Add pasteable commands for promql-transform (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
sed-i authored May 16, 2022
1 parent 8f93ba7 commit 6f2676c
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ $ charmcraft pack

### Deploy

There are two ways of deploying the prometheus-k8s operator, with and without
promql-transform. Deploying the charm without PromQL Transform means you won't
There are two ways of deploying the prometheus-k8s operator, with and without
promql-transform. Deploying the charm without PromQL Transform means you won't
get any Juju topology labels injected into your alert rule expressions.

#### Without PromQL Transform
Expand All @@ -73,17 +73,33 @@ $ juju deploy \

#### With PromQL Transform

Place the binary of your selected promql-transform version in the root of the prometheus-k8s
charm directory. Official binaries are available from the
Place the binary of your selected promql-transform version in the root of the
prometheus-k8s charm directory. Official binaries are available from the
[promql-transform repository](https://github.com/canonical/promql-transform).

For example:

```bash
$ wget -O promql-transform https://github.com/canonical/promql-transform/releases/download/rev6/promql-transform-amd64
```

Then pass the downloaded file as a resource to `juju deploy`:

```bash
$ juju deploy \
./prometheus-k8s_ubuntu-20.04-amd64.charm \
--resource prometheus-image=ubuntu/prometheus:latest \
--resource promql-transform-amd64=./promql-transform
```

Similarly, to upgrade the charm,

```bash
juju refresh \
--path=./prometheus-k8s_ubuntu-20.04-amd64.charm \
--resource promql-transform-amd64=./promql-transform
```

## Linting
Flake8 and black linters may be run to check charm and test source code using the
command
Expand Down

0 comments on commit 6f2676c

Please sign in to comment.