Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.

Commit d83a956

Browse files
feat: Upgrade to Keptn 0.17 (#345)
* feat: Upgrade to Keptn 0.17 Signed-off-by: TannerGabriel <gabrieltanner.code@gmail.com> * Reverse README formatting changes Signed-off-by: TannerGabriel <gabrieltanner.code@gmail.com>
1 parent 0d4da6d commit d83a956

File tree

6 files changed

+83
-36
lines changed

6 files changed

+83
-36
lines changed

.github/workflows/integration-tests.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
keptn-version: ["0.14.2", "0.15.1", "0.16.0"] # https://github.com/keptn/keptn/releases
20+
keptn-version: ["0.14.2", "0.15.1", "0.16.0", "0.17.0"] # https://github.com/keptn/keptn/releases
2121
prometheus-version: ["15.10.1"]
2222
env:
2323
GO_VERSION: 1.17
@@ -123,6 +123,13 @@ jobs:
123123
with:
124124
KEPTN_VERSION: ${{ matrix.keptn-version }}
125125
HELM_VALUES: |
126+
# Keptn 0.17 and newer
127+
apiGatewayNginx:
128+
type: LoadBalancer
129+
features:
130+
automaticProvisioning:
131+
serviceURL: http://keptn-gitea-provisioner-service.default
132+
# Keptn 0.16 compatibility
126133
control-plane:
127134
apiGatewayNginx:
128135
type: LoadBalancer

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# Prometheus Service
2+
23
![GitHub release (latest by date)](https://img.shields.io/github/v/release/keptn-contrib/prometheus-service)
34
[![Go Report Card](https://goreportcard.com/badge/github.com/keptn-contrib/prometheus-service)](https://goreportcard.com/report/github.com/keptn-contrib/prometheus-service)
45

56
The *prometheus-service* is a [Keptn](https://keptn.sh) integration responsible for:
67

7-
1. configuring Prometheus for monitoring services managed by Keptn,
8-
2. receiving alerts (on port 8080) from Prometheus Alertmanager and translating the alert payload to a cloud event (remediation.triggered) that is sent to the Keptn API,
9-
3. retrieving Service Level Indicators (SLIs) from a Prometheus API endpoint.
8+
1. configuring Prometheus for monitoring services managed by Keptn,
9+
2. receiving alerts (on port 8080) from Prometheus Alertmanager and translating the alert payload to a cloud event (
10+
remediation.triggered) that is sent to the Keptn API,
11+
3. retrieving Service Level Indicators (SLIs) from a Prometheus API endpoint.
1012

1113
## Compatibility Matrix
1214

13-
Please always double-check the version of Keptn you are using compared to the version of this service, and follow the compatibility matrix below.
15+
Please always double-check the version of Keptn you are using compared to the version of this service, and follow the
16+
compatibility matrix below.
1417

1518
| Keptn Version\* | [Prometheus Service Image](https://hub.docker.com/r/keptncontrib/prometheus-service/tags) |
1619
|:---------------:|:-----------------------------------------------------------------------------------------:|
@@ -23,14 +26,17 @@ Please always double-check the version of Keptn you are using compared to the ve
2326
| 0.15.1 | keptncontrib/prometheus-service:0.8.1\*** |
2427
| 0.16.0 | keptncontrib/prometheus-service:0.8.2\*** |
2528
| 0.16.0 | keptncontrib/prometheus-service:0.8.3 |
29+
| 0.17.0 | keptncontrib/prometheus-service:0.8.4 |
2630

2731
\* This is the Keptn version we aim to be compatible with. Other versions should work too, but there is no guarantee.
2832

29-
\** This version is only compatible with Keptn 0.14.2 and potentially newer releases of Keptn 0.14.x due to a breaking change in NATS cluster name.
33+
\** This version is only compatible with Keptn 0.14.2 and potentially newer releases of Keptn 0.14.x due to a breaking
34+
change in NATS cluster name.
3035

3136
\*** These versions are not compatible with Prometheus Alertmanager <= 0.24
3237

33-
You can find more information and older releases on the [Releases](https://github.com/keptn-contrib/prometheus-service/releases) page.
38+
You can find more information and older releases on
39+
the [Releases](https://github.com/keptn-contrib/prometheus-service/releases) page.
3440

3541
## Installation instructions
3642

@@ -79,7 +85,7 @@ Once this is done, you can go ahead and install prometheus-service:
7985
--reuse-values
8086
```
8187

82-
* (Optional) If you want to customize the namespaces of Keptn or the Prometheus installation, replace the environment
88+
* (Optional) If you want to customize the namespaces of Keptn or the Prometheus installation, replace the environment
8389
variable values according to the use case and apply the manifest:
8490

8591
```bash
@@ -180,7 +186,7 @@ Note: This creates an actual Kubernetes secret, with some Kubernetes labels (`ap
180186
181187
### User-defined Service Level Indicators (SLIs)
182188
183-
Users can override the predefined queries, as well as add custom queries by creating a SLI configuration.
189+
Users can override the predefined queries, as well as add custom queries by creating a SLI configuration.
184190
185191
* A SLI configuration is a yaml file as shown below:
186192
@@ -191,7 +197,7 @@ Users can override the predefined queries, as well as add custom queries by crea
191197
cpu_usage: avg(rate(container_cpu_usage_seconds_total{namespace="$PROJECT-$STAGE",pod_name=~"$SERVICE-primary-.*"}[5m]))
192198
response_time_p95: histogram_quantile(0.95, sum by(le) (rate(http_response_time_milliseconds_bucket{handler="ItemsController.addToCart",job="$SERVICE-$PROJECT-$STAGE-canary"}[$DURATION_SECONDS])))
193199
```
194-
This file contains a list of keys (e.g., `cpu_usage`) and a prometheus metric expressions (e.g., `avg(rate(...{filters}[timeframe]))`).
200+
This file contains a list of keys (e.g., `cpu_usage`) and a prometheus metric expressions (e.g., `avg(rate(...{filters}[timeframe]))`).
195201
196202
* To store this configuration, you need to add this file to a Keptn's configuration store, e.g., using the [keptn add-resource](https://keptn.sh/docs/0.14.x/reference/cli/commands/keptn_add-resource/) command:
197203

chart/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ distributor:
2626
image:
2727
repository: docker.io/keptn/distributor # Container Image Name
2828
pullPolicy: IfNotPresent # Kubernetes Image Pull Policy
29-
tag: "0.16.0" # Container Tag
29+
tag: "0.17.0" # Container Tag
3030
config:
3131
queueGroup:
3232
enabled: true # Enable connection via Nats queue group to support exactly-once message processing

go.mod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/golang/mock v1.6.0
1111
github.com/google/uuid v1.3.0
1212
github.com/kelseyhightower/envconfig v1.4.0
13-
github.com/keptn/go-utils v0.16.1-0.20220624075633-4d49101f88b4
13+
github.com/keptn/go-utils v0.17.0
1414
github.com/mitchellh/mapstructure v1.5.0
1515
github.com/prometheus/alertmanager v0.24.0
1616
github.com/prometheus/client_golang v1.12.2
@@ -35,7 +35,8 @@ require (
3535
github.com/felixge/httpsnoop v1.0.2 // indirect
3636
github.com/go-kit/log v0.2.0 // indirect
3737
github.com/go-logfmt/logfmt v0.5.1 // indirect
38-
github.com/go-logr/logr v1.2.2 // indirect
38+
github.com/go-logr/logr v1.2.3 // indirect
39+
github.com/go-logr/stdr v1.2.2 // indirect
3940
github.com/go-openapi/jsonpointer v0.19.5 // indirect
4041
github.com/go-openapi/jsonreference v0.19.6 // indirect
4142
github.com/go-openapi/swag v0.21.1 // indirect
@@ -61,16 +62,15 @@ require (
6162
github.com/prometheus/common/sigv4 v0.1.0 // indirect
6263
github.com/prometheus/procfs v0.7.3 // indirect
6364
github.com/spf13/pflag v1.0.5 // indirect
64-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.27.0 // indirect
65-
go.opentelemetry.io/otel v1.2.0 // indirect
66-
go.opentelemetry.io/otel/internal/metric v0.25.0 // indirect
67-
go.opentelemetry.io/otel/metric v0.25.0 // indirect
68-
go.opentelemetry.io/otel/trace v1.2.0 // indirect
65+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect
66+
go.opentelemetry.io/otel v1.7.0 // indirect
67+
go.opentelemetry.io/otel/metric v0.30.0 // indirect
68+
go.opentelemetry.io/otel/trace v1.7.0 // indirect
6969
go.uber.org/atomic v1.9.0 // indirect
7070
go.uber.org/multierr v1.6.0 // indirect
7171
go.uber.org/zap v1.19.0 // indirect
7272
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
73-
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
73+
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect
7474
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
7575
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
7676
golang.org/x/text v0.3.7 // indirect

0 commit comments

Comments
 (0)