From 76601eac6440ddd4b4e6e0904a4705d36a0a1969 Mon Sep 17 00:00:00 2001 From: Artem Pastukhov Date: Wed, 20 Feb 2019 14:23:13 +0300 Subject: [PATCH] Add ability to control prometheus TSDB locking (#11270) * Add enableTSDBLock var Signed-off-by: Artem Pastukhov * Add --storage.tsdb.no-lockfile flag calculation Signed-off-by: Artem Pastukhov * Revert logic for locking flag Signed-off-by: Artem Pastukhov * Remove extra space Signed-off-by: Artem Pastukhov * Add --storage.tsdb.no-lockfile Signed-off-by: Artem Pastukhov * Bump chart version Signed-off-by: Artem Pastukhov * Update README.md Signed-off-by: Artem Pastukhov * Remove exrtra whitespace Signed-off-by: Artem Pastukhov * Bump chart version Signed-off-by: Artem Pastukhov --- stable/prometheus/Chart.yaml | 2 +- stable/prometheus/README.md | 1 + stable/prometheus/templates/server-deployment.yaml | 3 +++ stable/prometheus/templates/server-statefulset.yaml | 3 +++ stable/prometheus/values.yaml | 3 +++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index 9dac6376cc..05ab21dc06 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus -version: 8.7.1 +version: 8.8.0 appVersion: 2.7.1 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/stable/prometheus/README.md b/stable/prometheus/README.md index 40c7752a33..107045bc4a 100644 --- a/stable/prometheus/README.md +++ b/stable/prometheus/README.md @@ -238,6 +238,7 @@ Parameter | Description | Default `server.image.tag` | Prometheus server container image tag | `v2.7.1` `server.image.pullPolicy` | Prometheus server container image pull policy | `IfNotPresent` `server.enableAdminApi` | If true, Prometheus administrative HTTP API will be enabled. Please note, that you should take care of administrative API access protection (ingress or some frontend Nginx with auth) before enabling it. | `false` +`server.skipTSDBLock` | If true, Prometheus skip TSDB locking. | `false` `server.configPath` | Path to a prometheus server config file on the container FS | `/etc/config/prometheus.yml` `server.global.scrape_interval` | How frequently to scrape targets by default | `1m` `server.global.scrape_timeout` | How long until a scrape request times out | `10s` diff --git a/stable/prometheus/templates/server-deployment.yaml b/stable/prometheus/templates/server-deployment.yaml index 73f6171457..98c74f45d9 100644 --- a/stable/prometheus/templates/server-deployment.yaml +++ b/stable/prometheus/templates/server-deployment.yaml @@ -103,6 +103,9 @@ spec: {{- if .Values.server.enableAdminApi }} - --web.enable-admin-api {{- end }} + {{- if .Values.server.skipTSDBLock }} + - --storage.tsdb.no-lockfile + {{- end }} ports: - containerPort: 9090 readinessProbe: diff --git a/stable/prometheus/templates/server-statefulset.yaml b/stable/prometheus/templates/server-statefulset.yaml index 82d85f72c6..c6340ac478 100644 --- a/stable/prometheus/templates/server-statefulset.yaml +++ b/stable/prometheus/templates/server-statefulset.yaml @@ -96,6 +96,9 @@ spec: {{- if .Values.server.enableAdminApi }} - --web.enable-admin-api {{- end }} + {{- if .Values.server.skipTSDBLock }} + - --storage.tsdb.no-lockfile + {{- end }} ports: - containerPort: 9090 readinessProbe: diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index 3d845e7f43..2d57ddcedc 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -555,6 +555,9 @@ server: ## series. This is disabled by default. enableAdminApi: false + ## This flag controls BD locking + skipTSDBLock: false + ## Path to a configuration file on prometheus server container FS configPath: /etc/config/prometheus.yml