From bf50cd30f6d3175a3e1dea1b86dfd5ea62dd60c5 Mon Sep 17 00:00:00 2001 From: Ilia Lazebnik Date: Sun, 22 Oct 2023 14:27:30 +0300 Subject: [PATCH 1/2] [prometheus] Allow setting automountServiceAccountToken (#3911) * Allow turning setting automountServiceAccountToken Signed-off-by: drfaust92 * Allow turning setting automountServiceAccountToken Signed-off-by: drfaust92 --------- Signed-off-by: drfaust92 --- charts/prometheus/Chart.yaml | 2 +- charts/prometheus/templates/serviceaccount.yaml | 3 +++ charts/prometheus/values.schema.json | 3 +++ charts/prometheus/values.yaml | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/prometheus/Chart.yaml b/charts/prometheus/Chart.yaml index 72f5413a0141..e006811d6978 100644 --- a/charts/prometheus/Chart.yaml +++ b/charts/prometheus/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: prometheus appVersion: v2.47.0 -version: 25.1.0 +version: 25.2.0 kubeVersion: ">=1.19.0-0" description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/charts/prometheus/templates/serviceaccount.yaml b/charts/prometheus/templates/serviceaccount.yaml index 273aa7eed118..cf1503451a6d 100644 --- a/charts/prometheus/templates/serviceaccount.yaml +++ b/charts/prometheus/templates/serviceaccount.yaml @@ -8,4 +8,7 @@ metadata: namespace: {{ include "prometheus.namespace" . }} annotations: {{ toYaml .Values.serviceAccounts.server.annotations | indent 4 }} +{{- if .Values.serviceAccounts.server.automountServiceAccountToken }} +automountServiceAccountToken: {{ .Values.serviceAccounts.server.automountServiceAccountToken }} +{{- end }} {{- end }} diff --git a/charts/prometheus/values.schema.json b/charts/prometheus/values.schema.json index f904812298bd..0b09912abb09 100644 --- a/charts/prometheus/values.schema.json +++ b/charts/prometheus/values.schema.json @@ -711,6 +711,9 @@ }, "name": { "type": "string" + }, + "automountServiceAccountToken": { + "type": "boolean" } } } diff --git a/charts/prometheus/values.yaml b/charts/prometheus/values.yaml index b47ec9921c36..ff71bdfe1887 100644 --- a/charts/prometheus/values.yaml +++ b/charts/prometheus/values.yaml @@ -14,6 +14,7 @@ serviceAccounts: create: true name: "" annotations: {} + # automountServiceAccountToken: ## Monitors ConfigMap changes and POSTs to a URL ## Ref: https://github.com/prometheus-operator/prometheus-operator/tree/main/cmd/prometheus-config-reloader From 6fb47fbaba215588d054e92db5a9fd060a0fc9d1 Mon Sep 17 00:00:00 2001 From: t3mi Date: Sun, 22 Oct 2023 15:27:45 +0300 Subject: [PATCH 2/2] [prometheus-json-exporter] fix configmap name according to standard (#3926) Signed-off-by: t3mi --- charts/prometheus-json-exporter/Chart.yaml | 2 +- charts/prometheus-json-exporter/README.md | 13 +++++++++++-- .../templates/configmap.yaml | 2 +- .../templates/deployment.yaml | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/charts/prometheus-json-exporter/Chart.yaml b/charts/prometheus-json-exporter/Chart.yaml index 0372c58d1d11..7de7dd23a45f 100644 --- a/charts/prometheus-json-exporter/Chart.yaml +++ b/charts/prometheus-json-exporter/Chart.yaml @@ -19,7 +19,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.7.3 +version: 0.8.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/prometheus-json-exporter/README.md b/charts/prometheus-json-exporter/README.md index c2348c432d0f..d688ece7eb37 100644 --- a/charts/prometheus-json-exporter/README.md +++ b/charts/prometheus-json-exporter/README.md @@ -1,4 +1,5 @@ # prometheus-json-exporter + Prometheus exporter for scraping JSON by JSONPath. This chart bootstraps a [json_exporter](https://github.com/prometheus-community/json_exporter) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. @@ -8,7 +9,7 @@ This chart bootstraps a [json_exporter](https://github.com/prometheus-community/ - Kubernetes 1.10+ with Beta APIs enabled - Helm 3+ -## Get Repo Info +## Get Repository Info ```console helm repo add prometheus-community https://prometheus-community.github.io/helm-charts @@ -16,7 +17,9 @@ helm repo add stable https://charts.helm.sh/stable helm repo update ``` + _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ + ## Install Chart @@ -24,6 +27,7 @@ _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation # Helm $ helm install [RELEASE_NAME] prometheus-community/prometheus-json-exporter ``` + _See [configuration](## Configuring) below._ _See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._ @@ -46,6 +50,11 @@ _See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command doc $ helm upgrade [RELEASE_NAME] [CHART] --install ``` +### From 0.7.x to 0.8.0 + +This version fixes configmap name according to the chart standard so that configmap will be recreated with subsequent deployment rollout. +See [#3926](https://github.com/prometheus-community/helm-charts/pull/3926) for more context. + ## Configuring See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands: @@ -55,4 +64,4 @@ See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_h $ helm show values prometheus-community/prometheus-json-exporter ``` -For more information please refer to the [json_exporter](https://github.com/prometheus-community/json_exporter) documentation. \ No newline at end of file +For more information please refer to the [json_exporter](https://github.com/prometheus-community/json_exporter) documentation. diff --git a/charts/prometheus-json-exporter/templates/configmap.yaml b/charts/prometheus-json-exporter/templates/configmap.yaml index afea5c17b40b..e68ccbb780e4 100644 --- a/charts/prometheus-json-exporter/templates/configmap.yaml +++ b/charts/prometheus-json-exporter/templates/configmap.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Release.Name }}-configmap + name: {{ include "prometheus-json-exporter.fullname" . }} data: allow-snippet-annotations: "false" config.yml: | diff --git a/charts/prometheus-json-exporter/templates/deployment.yaml b/charts/prometheus-json-exporter/templates/deployment.yaml index 3069dbf5e9a7..b2d149cb6b0b 100644 --- a/charts/prometheus-json-exporter/templates/deployment.yaml +++ b/charts/prometheus-json-exporter/templates/deployment.yaml @@ -69,7 +69,7 @@ spec: volumes: - name: config-configmap-volume configMap: - name: {{ .Release.Name }}-configmap + name: {{ include "prometheus-json-exporter.fullname" . }} items: - key: config.yml path: config.yml