From efdcffe0b6973111ec6e5e83136ea74cdbe6527d Mon Sep 17 00:00:00 2001 From: Alex Didenko Date: Tue, 15 May 2018 12:27:26 +0200 Subject: [PATCH] [stable/prometheus] Ability to enable admin API (#5570) New `server.enableAdminApi` option to control administrative HTTP API Closes #5568 --- stable/prometheus/Chart.yaml | 2 +- stable/prometheus/README.md | 1 + stable/prometheus/templates/server-deployment.yaml | 3 +++ stable/prometheus/values.yaml | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index 215b6c1df4..dd15b20e94 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus -version: 6.6.0 +version: 6.6.1 appVersion: 2.2.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 c0332f66d1..0bd5e4a6a8 100644 --- a/stable/prometheus/README.md +++ b/stable/prometheus/README.md @@ -208,6 +208,7 @@ Parameter | Description | Default `server.image.repository` | Prometheus server container image repository | `prom/prometheus` `server.image.tag` | Prometheus server container image tag | `v2.1.0` `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.extraArgs` | Additional Prometheus server container arguments | `{}` `server.prefixURL` | The prefix slug at which the server can be accessed | `` `server.baseURL` | The external url at which the server can be accessed | `` diff --git a/stable/prometheus/templates/server-deployment.yaml b/stable/prometheus/templates/server-deployment.yaml index 8ce7524f55..2f1cb122c0 100644 --- a/stable/prometheus/templates/server-deployment.yaml +++ b/stable/prometheus/templates/server-deployment.yaml @@ -83,6 +83,9 @@ spec: {{- if .Values.server.baseURL }} - --web.external-url={{ .Values.server.baseURL }} {{- end }} + {{- if .Values.server.enableAdminApi }} + - --web.enable-admin-api + {{- end }} ports: - containerPort: 9090 readinessProbe: diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index 94b96fe319..64a8a09f56 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -444,6 +444,10 @@ server: ## Maybe same with Ingress host name baseURL: "" + ## This flag controls access to the administrative HTTP API which includes functionality such as deleting time + ## series. This is disabled by default. + enableAdminApi: false + ## Additional Prometheus server container arguments ## extraArgs: {}